Class: Leftovers::AST::NumericNode

Inherits:
Node
  • Object
show all
Defined in:
lib/leftovers/ast/numeric_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)


8
9
10
# File 'lib/leftovers/ast/numeric_node.rb', line 8

def scalar?
  true
end

#to_sObject Also known as: to_literal_s



12
13
14
# File 'lib/leftovers/ast/numeric_node.rb', line 12

def to_s
  to_scalar_value.to_s
end

#to_symObject



17
18
19
# File 'lib/leftovers/ast/numeric_node.rb', line 17

def to_sym
  to_s.to_sym
end