Class: MrbParser::DebugSection
- Defined in:
- lib/mrb_parser/debug_section.rb
Constant Summary
Constants inherited from Section
Section::BINARY_EOF, Section::DEBUG_IDENTIFIER, Section::IREP_IDENTIFIER, Section::LINENO_IDENTIFIER
Instance Attribute Summary collapse
-
#debug_info ⇒ Object
Returns the value of attribute debug_info.
-
#filenames ⇒ Object
Returns the value of attribute filenames.
Attributes inherited from Section
Instance Method Summary collapse
- #dump ⇒ Object
-
#initialize ⇒ DebugSection
constructor
A new instance of DebugSection.
- #parse_body(parser) ⇒ Object
- #parse_record(parser) ⇒ Object
Methods inherited from Section
Constructor Details
#initialize ⇒ DebugSection
Returns a new instance of DebugSection.
10 11 12 |
# File 'lib/mrb_parser/debug_section.rb', line 10 def initialize(*) super end |
Instance Attribute Details
#debug_info ⇒ Object
Returns the value of attribute debug_info.
7 8 9 |
# File 'lib/mrb_parser/debug_section.rb', line 7 def debug_info @debug_info end |
#filenames ⇒ Object
Returns the value of attribute filenames.
8 9 10 |
# File 'lib/mrb_parser/debug_section.rb', line 8 def filenames @filenames end |
Instance Method Details
#dump ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/mrb_parser/debug_section.rb', line 30 def dump printf "*** DEBUG SECTION ***\n" printf "secID: %s\n", @signature printf "size : %s\n", @size printf "files: %d\n", @filenames.size @filenames.each do |fname| printf " filename: %s\n", fname end @debug_info.dump printf "*** ***\n" end |
#parse_body(parser) ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/mrb_parser/debug_section.rb', line 20 def parse_body(parser) filenames_len = parser.read_uint16 @filenames = [] filenames_len.times do @filenames << parser.read_n16string end parse_record(parser) self end |