Class: Caf::Chunk::MagicCookie
- Defined in:
- lib/caf/chunk/magic_cookie.rb
Instance Attribute Summary collapse
-
#position ⇒ Object
readonly
, :data.
-
#size ⇒ Object
readonly
, :data.
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#check_type_and_size, implements, #initialize
Constructor Details
This class inherits a constructor from Caf::Chunk::Base
Instance Attribute Details
#position ⇒ Object (readonly)
, :data
11 12 13 |
# File 'lib/caf/chunk/magic_cookie.rb', line 11 def position @position end |
#size ⇒ Object (readonly)
, :data
11 12 13 |
# File 'lib/caf/chunk/magic_cookie.rb', line 11 def size @size end |
Instance Method Details
#fields_size ⇒ Object
23 24 25 |
# File 'lib/caf/chunk/magic_cookie.rb', line 23 def fields_size raise(Caf::Error, "not implemented") end |
#read_data(file) ⇒ Object
27 28 29 30 31 32 |
# File 'lib/caf/chunk/magic_cookie.rb', line 27 def read_data(file) @size = chunk_size @position = file.pos #@data = file.read(chunk_size) super(file) end |
#to_s ⇒ Object
13 14 15 16 17 |
# File 'lib/caf/chunk/magic_cookie.rb', line 13 def to_s "#{chunk_type} (magic cookie chunk)\n" + " -cookie size: #{size}\n" + " -cookie position: #{position}\n" end |
#validate ⇒ Object
19 20 21 |
# File 'lib/caf/chunk/magic_cookie.rb', line 19 def validate true end |