Class: ActionImplementation
- Inherits:
-
TheoryAction
- Object
- TheoryAction
- ActionImplementation
- Defined in:
- lib/theory/ActionImplementation.rb
Instance Attribute Summary collapse
-
#target_id ⇒ Object
readonly
Returns the value of attribute target_id.
Attributes inherited from TheoryAction
Attributes included from TheoryComponent
Instance Method Summary collapse
- #copy ⇒ Object
-
#initialize(statement, target_id, theory_component_id = nil) ⇒ ActionImplementation
constructor
A new instance of ActionImplementation.
- #write(tab = 0) ⇒ Object
Methods inherited from TheoryAction
#describe, #map_to, #statements_with_variable, #theory_variables
Methods included from TheoryComponent
#accessors, #generate_theory_component_id, #statements_with_variable, #theory_variables, #tokens
Methods included from ActsAsCode
Constructor Details
#initialize(statement, target_id, theory_component_id = nil) ⇒ ActionImplementation
Returns a new instance of ActionImplementation.
5 6 7 |
# File 'lib/theory/ActionImplementation.rb', line 5 def initialize(statement,target_id,theory_component_id=nil) super(statement,target_id,theory_component_id) end |
Instance Attribute Details
#target_id ⇒ Object (readonly)
Returns the value of attribute target_id.
3 4 5 |
# File 'lib/theory/ActionImplementation.rb', line 3 def target_id @target_id end |
Instance Method Details
#copy ⇒ Object
9 10 11 |
# File 'lib/theory/ActionImplementation.rb', line 9 def copy return ActionImplementation.new(@action.copy,@target_id.copy,@theory_component_id) end |
#write(tab = 0) ⇒ Object
13 14 15 |
# File 'lib/theory/ActionImplementation.rb', line 13 def write(tab=0) return ("\t"*tab)+"runtime_method.add_statement_at(#{@action.write},#{@target_id.write})" end |