Class: Leftovers::AST::NilNode

Inherits:
Node
  • Object
show all
Defined in:
lib/leftovers/ast/nil_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?, #to_literal_s, #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/nil_node.rb', line 10

def scalar?
  true
end

#to_sObject



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

def to_s
  ''
end

#to_scalar_valueObject



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

def to_scalar_value
  nil
end

#to_symObject



18
19
20
# File 'lib/leftovers/ast/nil_node.rb', line 18

def to_sym
  :nil
end