class Riml::ForNode
for variable in someFunction(1,2,3)
echo variable
end
OR
for variable in [1,2,3]
echo variable
end
Public Instance Methods
children()
click to toggle source
# File lib/riml/nodes.rb, line 884 def children [variable, in_expression, expressions] end
for_node_variable_names()
click to toggle source
# File lib/riml/nodes.rb, line 868 def for_node_variable_names if ListNode === variable variable.value.map(&:name) else [variable.name] end end
to_scope()
click to toggle source
# File lib/riml/nodes.rb, line 876 def to_scope ScopeNode.new.tap do |s| s.for_node_variable_names += for_node_variable_names s.argument_variable_names = (self.scope && self.scope.argument_variable_names) s.function = (self.scope && self.scope.function) || nil end end
variables()
click to toggle source
# File lib/riml/nodes.rb, line 864 def variables variable if ListNode === variable end