Class: MarshalParser::Parser::TrueNode

Inherits:
Node
  • Object
show all
Defined in:
lib/marshal-parser/parser.rb

Instance Method Summary collapse

Methods inherited from Node

#attributes, #children, #decoded_value, #literal_token, #tokens

Methods included from Assertable

#assert

Constructor Details

#initialize(token) ⇒ TrueNode

Returns a new instance of TrueNode.



424
425
426
427
428
# File 'lib/marshal-parser/parser.rb', line 424

def initialize(token)
  super()
  assert_token_type(token, Lexer::TRUE)
  @token = token
end

Instance Method Details

#always_leaf?Boolean

Returns:

  • (Boolean)


434
435
436
# File 'lib/marshal-parser/parser.rb', line 434

def always_leaf?
  true
end

#child_entitiesObject



430
431
432
# File 'lib/marshal-parser/parser.rb', line 430

def child_entities
  [@token]
end