Class: Leftovers::AST::StrNode

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

Instance Method Summary collapse

Methods inherited from Node

#arguments, #as_arguments_list, #block_given?, #first, #hash?, #initialize, #kwargs, #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

#nameObject



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

def name
  first.to_sym
end

#scalar?Boolean

Returns:

  • (Boolean)


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

def scalar?
  true
end

#to_symObject



15
16
17
# File 'lib/leftovers/ast/str_node.rb', line 15

def to_sym
  to_s.to_sym
end