Class: C0::Group
- Inherits:
-
Object
- Object
- C0::Group
- Defined in:
- lib/c0.rb
Overview
A group within a document; read it as a Table.
Instance Method Summary collapse
-
#initialize(buf, start, finish) ⇒ Group
constructor
A new instance of Group.
- #name ⇒ Object
- #raw ⇒ Object
- #record(index) ⇒ Object
- #record_count ⇒ Object
- #table ⇒ Object
Constructor Details
#initialize(buf, start, finish) ⇒ Group
Returns a new instance of Group.
165 166 167 168 169 |
# File 'lib/c0.rb', line 165 def initialize(buf, start, finish) @buf = buf @start = start @end = finish end |
Instance Method Details
#name ⇒ Object
173 |
# File 'lib/c0.rb', line 173 def name = table.name |
#raw ⇒ Object
175 |
# File 'lib/c0.rb', line 175 def raw = @buf.byteslice(@start, @end - @start) |
#record(index) ⇒ Object
177 |
# File 'lib/c0.rb', line 177 def record(index) = table.record(index) |
#record_count ⇒ Object
179 |
# File 'lib/c0.rb', line 179 def record_count = table.record_count |