Class: Johnson::Nodes::Function

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

Instance Attribute Summary collapse

Attributes inherited from Node

#column, #line, #value

Instance Method Summary collapse

Methods inherited from Node

#each, #to_dot, #to_ecma, #to_s, #to_sexp

Methods included from Visitable

#accept

Constructor Details

#initialize(line, column, name, arguments, body) ⇒ Function

Returns a new instance of Function.



6
7
8
9
10
# File 'lib/johnson/nodes/function.rb', line 6

def initialize(line, column, name, arguments, body)
  super(line, column, body)
  @name       = name
  @arguments  = arguments
end

Instance Attribute Details

#argumentsObject

Returns the value of attribute arguments.



5
6
7
# File 'lib/johnson/nodes/function.rb', line 5

def arguments
  @arguments
end

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/johnson/nodes/function.rb', line 5

def name
  @name
end