Class: StatementLiteral
Instance Method Summary collapse
- #copy ⇒ Object
-
#initialize(statement) ⇒ StatementLiteral
constructor
A new instance of StatementLiteral.
- #write ⇒ Object
Constructor Details
#initialize(statement) ⇒ StatementLiteral
Returns a new instance of StatementLiteral.
8 9 10 |
# File 'lib/core/literal/StatementLiteral.rb', line 8 def initialize(statement) @statement = statement end |
Instance Method Details
#copy ⇒ Object
24 25 26 |
# File 'lib/core/literal/StatementLiteral.rb', line 24 def copy return StatementLiteral.new(@statement.copy) end |
#write ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/core/literal/StatementLiteral.rb', line 14 def write l = 'Statement.new(' @statement.each do |x| l += x.creation l += ',' unless x.object_id == @statement.last.object_id end l += ')' return l end |