Class: Execution
- Inherits:
-
Object
- Object
- Execution
- Defined in:
- lib/Execution.rb
Instance Attribute Summary collapse
-
#caller_class ⇒ Object
Returns the value of attribute caller_class.
-
#caller_id ⇒ Object
Returns the value of attribute caller_id.
-
#child ⇒ Object
Returns the value of attribute child.
-
#control ⇒ Object
Returns the value of attribute control.
-
#is_reflecting ⇒ Object
Returns the value of attribute is_reflecting.
-
#object ⇒ Object
Returns the value of attribute object.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#reflections ⇒ Object
Returns the value of attribute reflections.
Instance Method Summary collapse
- #has_empty_reflections? ⇒ Boolean
- #has_finished_reflecting? ⇒ Boolean
-
#initialize(object, reflection_count) ⇒ Execution
constructor
A new instance of Execution.
-
#is_reflecting? ⇒ Boolean
Is the Execution currently reflecting methods?.
Constructor Details
#initialize(object, reflection_count) ⇒ Execution
Returns a new instance of Execution.
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/Execution.rb', line 12 def initialize(object, reflection_count) @object = object @caller_id = object.object_id @caller_class = object.class @parent = nil @child = nil @control = [] @reflections = Array.new(reflection_count) @is_reflecting = false end |
Instance Attribute Details
#caller_class ⇒ Object
Returns the value of attribute caller_class.
5 6 7 |
# File 'lib/Execution.rb', line 5 def caller_class @caller_class end |
#caller_id ⇒ Object
Returns the value of attribute caller_id.
4 5 6 |
# File 'lib/Execution.rb', line 4 def caller_id @caller_id end |
#child ⇒ Object
Returns the value of attribute child.
7 8 9 |
# File 'lib/Execution.rb', line 7 def child @child end |
#control ⇒ Object
Returns the value of attribute control.
8 9 10 |
# File 'lib/Execution.rb', line 8 def control @control end |
#is_reflecting ⇒ Object
Returns the value of attribute is_reflecting.
10 11 12 |
# File 'lib/Execution.rb', line 10 def is_reflecting @is_reflecting end |
#object ⇒ Object
Returns the value of attribute object.
3 4 5 |
# File 'lib/Execution.rb', line 3 def object @object end |
#parent ⇒ Object
Returns the value of attribute parent.
6 7 8 |
# File 'lib/Execution.rb', line 6 def parent @parent end |
#reflections ⇒ Object
Returns the value of attribute reflections.
9 10 11 |
# File 'lib/Execution.rb', line 9 def reflections @reflections end |
Instance Method Details
#has_empty_reflections? ⇒ Boolean
26 27 28 |
# File 'lib/Execution.rb', line 26 def has_empty_reflections? @reflections.include? nil end |
#has_finished_reflecting? ⇒ Boolean
37 38 39 40 41 42 43 44 45 |
# File 'lib/Execution.rb', line 37 def has_finished_reflecting? if is_reflecting? return false end if has_empty_reflections? return false end return true end |
#is_reflecting? ⇒ Boolean
Is the Execution currently reflecting methods?
33 34 35 |
# File 'lib/Execution.rb', line 33 def is_reflecting? @is_reflecting end |