Class: WORF::DebugAbbrev

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

Instance Method Summary collapse

Constructor Details

#initialize(io, section, head_pos) ⇒ DebugAbbrev

Returns a new instance of DebugAbbrev.



491
492
493
494
495
# File 'lib/worf.rb', line 491

def initialize io, section, head_pos
  @io      = io
  @section = section
  @head_pos     = head_pos
end

Instance Method Details

#tagsObject



497
498
499
500
501
502
503
504
505
506
507
# File 'lib/worf.rb', line 497

def tags
  @tags ||= begin
              @io.seek @head_pos + @section.offset, IO::SEEK_SET
              tags = []
              loop do
                break if @io.pos + 1 >= @head_pos + @section.offset + @section.size
                tags << read_tag
              end
              tags
            end
end