Class: Raiff::Chunk
- Inherits:
-
Object
show all
- Defined in:
- lib/raiff/chunk.rb
Defined Under Namespace
Classes: Common, Data, Form, SoundData
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Properties ===========================================================.
-
#size ⇒ Object
readonly
Properties ===========================================================.
Instance Method Summary
collapse
Constructor Details
#initialize(file) ⇒ Chunk
Instance Methods =====================================================
17
18
19
20
21
|
# File 'lib/raiff/chunk.rb', line 17
def initialize(file)
@file = file
@id = file.read(4)
@size = file.unpack('N')[0]
end
|
Instance Attribute Details
#id ⇒ Object
Properties ===========================================================
11
12
13
|
# File 'lib/raiff/chunk.rb', line 11
def id
@id
end
|
#size ⇒ Object
Properties ===========================================================
11
12
13
|
# File 'lib/raiff/chunk.rb', line 11
def size
@size
end
|
Instance Method Details
#inspect ⇒ Object
23
24
25
|
# File 'lib/raiff/chunk.rb', line 23
def inspect
"<#{self.class}\##{object_id} #{@id} #{@size}>"
end
|