Class: Sexp2Ruby::Node::OpAsgnOr
- Defined in:
- lib/sexp2ruby/node/op_asgn_or.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
a ||= 1 [[:lvar, :a], [:lasgn, :a, [:lit, 1]]].
Methods inherited from Base
Constructor Details
This class inherits a constructor from Sexp2Ruby::Node::Base
Instance Method Details
#to_s(exp) ⇒ Object
a ||= 1
- [:lvar, :a], [:lasgn, :a, [:lit, 1]]
7 8 9 10 |
# File 'lib/sexp2ruby/node/op_asgn_or.rb', line 7 def to_s(exp) exp.shift process(exp.shift).sub(/\=/, '||=') end |