Class: MarshalParser::Parser::ObjectNode
- Defined in:
- lib/marshal-parser/parser.rb
Instance Method Summary collapse
- #attributes ⇒ Object
- #child_entities ⇒ Object
-
#initialize(prefix, class_name_node, ivars_count, ivars_nodes) ⇒ ObjectNode
constructor
A new instance of ObjectNode.
Methods inherited from Node
#always_leaf?, #children, #decoded_value, #literal_token, #tokens
Methods included from Assertable
Constructor Details
#initialize(prefix, class_name_node, ivars_count, ivars_nodes) ⇒ ObjectNode
Returns a new instance of ObjectNode.
771 772 773 774 775 776 777 778 779 780 |
# File 'lib/marshal-parser/parser.rb', line 771 def initialize(prefix, class_name_node, ivars_count, ivars_nodes) super() assert_token_type prefix, Lexer::OBJECT_PREFIX assert_token_type ivars_count, Lexer::INTEGER @prefix = prefix @class_name_node = class_name_node @ivars_count = ivars_count @ivars_nodes = ivars_nodes end |
Instance Method Details
#attributes ⇒ Object
786 787 788 789 790 |
# File 'lib/marshal-parser/parser.rb', line 786 def attributes { @ivars_count => { name: :ivars_count, value: @ivars_count.value } } end |
#child_entities ⇒ Object
782 783 784 |
# File 'lib/marshal-parser/parser.rb', line 782 def child_entities [@prefix, @class_name_node, @ivars_count] + @ivars_nodes end |