Class: JsonQuery::Addition

Inherits:
Treetop::Runtime::SyntaxNode
  • Object
show all
Defined in:
lib/json_query/nodes.rb

Instance Method Summary collapse

Instance Method Details

#value(expr1, expr2) ⇒ Object



171
172
173
174
175
# File 'lib/json_query/nodes.rb', line 171

def value(expr1, expr2)
  String === expr1 || String === expr2 ?
      expr1.to_s + expr2.to_s :
      expr1 + expr2
end