Class: Sexp2Ruby::Node::OpAsgn1
- Defined in:
- lib/sexp2ruby/node/op_asgn1.rb
Constant Summary
Constants inherited from Base
Base::ASSIGN_NODES, Base::LF, Base::LINE_LENGTH
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#to_s(exp) ⇒ Object
[[:lvar, :b], [:arglist, [:lit, 1]], :“||”, [:lit, 10]].
Methods inherited from Base
Constructor Details
This class inherits a constructor from Sexp2Ruby::Node::Base
Instance Method Details
#to_s(exp) ⇒ Object
- [:lvar, :b], [:arglist, [:lit, 1]], :“||”, [:lit, 10]
6 7 8 9 10 11 12 13 |
# File 'lib/sexp2ruby/node/op_asgn1.rb', line 6 def to_s(exp) lhs = process(exp.shift) index = process(exp.shift) msg = exp.shift rhs = process(exp.shift) "#{lhs}[#{index}] #{msg}= #{rhs}" end |