Class: Bcome::Orchestration::Base
- Inherits:
-
Object
- Object
- Bcome::Orchestration::Base
- Defined in:
- lib/objects/orchestration/base.rb
Direct Known Subclasses
Instance Method Summary collapse
- #do_execute ⇒ Object
-
#initialize(node, arguments) ⇒ Base
constructor
A new instance of Base.
- #method_missing(method_sym, *_arguments) ⇒ Object
Constructor Details
#initialize(node, arguments) ⇒ Base
Returns a new instance of Base.
5 6 7 8 |
# File 'lib/objects/orchestration/base.rb', line 5 def initialize(node, arguments) @node = node @arguments = arguments end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_sym, *_arguments) ⇒ Object
22 23 24 25 26 27 |
# File 'lib/objects/orchestration/base.rb', line 22 def method_missing(method_sym, *_arguments) ## A thread error deep in the bowels of IRB is not playing well with orchestration missing methods within the orchestration namespace. Until this can be resolved, ## I've re-implemented it here. raise NameError, "NameError (undefined local variable or method '#{method_sym}' for #{self.class}" end |
Instance Method Details
#do_execute ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/objects/orchestration/base.rb', line 10 def do_execute raise Bcome::Exception::MissingExecuteOnRegistryObject, self.class.to_s unless respond_to?(:execute) begin execute rescue ::Bcome::Exception::Base => bcome_exception show_backtrace = true unless bcome_exception.is_a?(::Bcome::Exception::InvalidMetaDataEncryptionKey) bcome_exception.pretty_display(show_backtrace) raise ::Bcome::Exception::UserOrchestrationError, self.class.to_s end end |