Class: VariableContainer
- Inherits:
-
BaseVariable
- Object
- Array
- BaseVariable
- VariableContainer
- Defined in:
- lib/core/variable/VariableContainer.rb
Instance Attribute Summary collapse
-
#realised ⇒ Object
writeonly
Sets the attribute realised.
Attributes inherited from BaseVariable
#instance_variable, #uniq_id_history, #value, #variable_id
Attributes included from Variable
Instance Method Summary collapse
-
#copy ⇒ Object
Returns a duplicate of this variable container.
-
#initialize ⇒ VariableContainer
constructor
A new instance of VariableContainer.
-
#variable ⇒ Object
TODO Write description - hack for instance calls.
Methods inherited from BaseVariable
#destructive_instance_calls, #find_actual_variable, #instance_calls, #realised?, reset_global_id, #returning_instance_calls, #write, #write_with_uniq_id
Methods included from Variable
#increament_uniq_id!, #meets_requirements?, reset_global_id, #to_var, variable_id
Methods included from VariableIncluded
Methods inherited from Array
#cauldron_method_calls, #contains?, #select_all, #to_declaration, #to_intrinsic, #to_literal, #to_var, #write
Constructor Details
#initialize ⇒ VariableContainer
Returns a new instance of VariableContainer.
5 6 7 8 9 |
# File 'lib/core/variable/VariableContainer.rb', line 5 def initialize super() @realised = false end |
Instance Attribute Details
#realised=(value) ⇒ Object (writeonly)
Sets the attribute realised
3 4 5 |
# File 'lib/core/variable/VariableContainer.rb', line 3 def realised=(value) @realised = value end |
Instance Method Details
#copy ⇒ Object
Returns a duplicate of this variable container.
13 14 15 16 17 18 19 20 21 |
# File 'lib/core/variable/VariableContainer.rb', line 13 def copy result = VariableContainer.new(){{:variable_id => self.variable_id,:uniq_id=>@uniq_id, :uniq_id_history=>@uniq_id_history.copy}} result.instance_variable = @instance_variable self.each do |x| result.push(x) end result.realised = @realised return result end |
#variable ⇒ Object
TODO Write description - hack for instance calls
24 25 26 |
# File 'lib/core/variable/VariableContainer.rb', line 24 def variable return self end |