Class: Orchestra::Performance::Movement
- Inherits:
-
Object
- Object
- Orchestra::Performance::Movement
- Defined in:
- lib/orchestra/performance.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#node ⇒ Object
readonly
Returns the value of attribute node.
-
#performance ⇒ Object
readonly
Returns the value of attribute performance.
Class Method Summary collapse
Instance Method Summary collapse
- #build_context(performance) ⇒ Object
-
#initialize(node, performance) ⇒ Movement
constructor
A new instance of Movement.
- #perform ⇒ Object
Constructor Details
#initialize(node, performance) ⇒ Movement
Returns a new instance of Movement.
77 78 79 80 81 |
# File 'lib/orchestra/performance.rb', line 77 def initialize node, performance @node = node @performance = performance @context = build_context performance end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
75 76 77 |
# File 'lib/orchestra/performance.rb', line 75 def context @context end |
#node ⇒ Object (readonly)
Returns the value of attribute node.
75 76 77 |
# File 'lib/orchestra/performance.rb', line 75 def node @node end |
#performance ⇒ Object (readonly)
Returns the value of attribute performance.
75 76 77 |
# File 'lib/orchestra/performance.rb', line 75 def performance @performance end |
Class Method Details
.perform(node, *args) ⇒ Object
65 66 67 68 69 70 71 72 73 |
# File 'lib/orchestra/performance.rb', line 65 def self.perform node, *args if node.is_a? Operation klass = EmbeddedOperation else klass = node.collection ? CollectionMovement : self end instance = klass.new node, *args node.process instance.perform end |
Instance Method Details
#build_context(performance) ⇒ Object
87 88 89 |
# File 'lib/orchestra/performance.rb', line 87 def build_context performance node.build_context performance.state end |
#perform ⇒ Object
83 84 85 |
# File 'lib/orchestra/performance.rb', line 83 def perform context.perform end |