Class: XABA::DataEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/xaba/container.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#configObject

Returns the value of attribute config.



97
98
99
# File 'lib/xaba/container.rb', line 97

def config
  @config
end

#dataObject

Returns the value of attribute data.



97
98
99
# File 'lib/xaba/container.rb', line 97

def data
  @data
end

Class Method Details

.read(f) ⇒ Object



107
108
109
110
111
112
# File 'lib/xaba/container.rb', line 107

def self.read(f)
  r = super
  raise "invalid magic: #{r.magic.inspect}" if r.magic != "XALZ"

  r
end

Instance Method Details

#inspectObject



99
100
101
# File 'lib/xaba/container.rb', line 99

def inspect
  super.sub(/^#<struct /, "<")
end

#packObject



103
104
105
# File 'lib/xaba/container.rb', line 103

def pack
  super + data
end