Class: Node::ARRAY

Inherits:
Node
  • Object
show all
Defined in:
lib/decompiler/node/as_expression.rb

Instance Method Summary collapse

Methods inherited from Node

#as_code, #as_expression, #as_paren_expression, define_code, define_expression

Instance Method Details

#as_expression_impl(node, brackets = true) ⇒ Object



108
109
110
111
112
113
# File 'lib/decompiler/node/as_expression.rb', line 108

def as_expression_impl(node, brackets = true)
  s = brackets ? '[' : ''
  s << (node.to_a.map { |n| n.as_expression }.join(', '))
  s << (brackets ? ']' : '')
  s
end