Class: SpotFeel::PositionalParameters

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

Overview

  1. positional parameters = [ expression , { “,” , expression } ] ;

Instance Method Summary collapse

Methods inherited from Node

#qualified_names_in_context, #raise_evaluation_error

Instance Method Details

#eval(context = {}) ⇒ Object



414
415
416
# File 'lib/spot_feel/nodes.rb', line 414

def eval(context = {})
  expressions.inject([]) { |arr, exp| arr << exp.eval(context) }
end

#expressionsObject



418
419
420
# File 'lib/spot_feel/nodes.rb', line 418

def expressions
  [expression] + more_expressions.elements.map { |e| e.expression }
end