Class: Leftovers::AST::TrueNode

Inherits:
Node
  • Object
show all
Defined in:
lib/leftovers/ast/true_node.rb

Instance Method Summary collapse

Methods inherited from Node

#arguments, #as_arguments_list, #block_given?, #first, #hash?, #initialize, #kwargs, #name, #parent, #parent=, #path, #positional_arguments, #privacy, #privacy=, #proc?, #receiver, #second, #sym?, #updated

Constructor Details

This class inherits a constructor from Leftovers::AST::Node

Instance Method Details

#scalar?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/leftovers/ast/true_node.rb', line 10

def scalar?
  true
end

#to_sObject Also known as: to_literal_s



14
15
16
# File 'lib/leftovers/ast/true_node.rb', line 14

def to_s
  'true'
end

#to_scalar_valueObject



6
7
8
# File 'lib/leftovers/ast/true_node.rb', line 6

def to_scalar_value
  true
end

#to_symObject



19
20
21
# File 'lib/leftovers/ast/true_node.rb', line 19

def to_sym
  :true
end