Class: StatementLiteral

Inherits:
Object show all
Defined in:
lib/core/literal/StatementLiteral.rb

Instance Method Summary collapse

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

#copyObject



24
25
26
# File 'lib/core/literal/StatementLiteral.rb', line 24

def copy
  return StatementLiteral.new(@statement.copy)
end

#writeObject



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