Class: FlavourSaver::CallNode

Inherits:
Node
  • Object
show all
Defined in:
lib/flavour_saver/nodes.rb

Direct Known Subclasses

LiteralCallNode, LocalVarNode, ParentCallNode

Instance Method Summary collapse

Methods inherited from Node

#inspect

Instance Method Details

#arguments_to_str(str = '') ⇒ Object



63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/flavour_saver/nodes.rb', line 63

def arguments_to_str(str='')
  str = str.dup # RLTK magic?
  arguments.each do |arg|
    str << ' '
    if arg.respond_to? :join
      str << arg.join('.')
    elsif arg.respond_to? :keys
      arg.each do |k,v|
        str << "#{k}: #{v.inspect}"
      end
    else
      str << arg.inspect
    end
  end
  str
end

#to_sObject



80
81
82
# File 'lib/flavour_saver/nodes.rb', line 80

def to_s
  arguments_to_str(name)
end