Class NWN::Gff::Writer

  1. lib/nwn/gff/writer.rb
Parent: Object

Methods

public class

  1. dump

Included modules

  1. NWN::Gff

Attributes

bytes [R]

Public class methods

dump (gff, io = nil, data_type = nil)

Takes a NWN::Gff::Gff object and dumps it to io, including the header. If io is nil, return the raw bytes, otherwise the number of bytes written.

[show source]
    # File lib/nwn/gff/writer.rb, line 12
12:   def self.dump(gff, io = nil, data_type = nil)
13:     ret = new(gff, data_type).bytes
14:     if io
15:       io.write(ret)
16:       ret.size
17:     else
18:       ret
19:     end
20:   end