Class: C0::Group

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

Overview

A group within a document; read it as a Table.

Instance Method Summary collapse

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

#table ⇒ Object



171
# File 'lib/c0.rb', line 171

def table = Table.new(@buf, @start)