Class: Theatre::CallbackDefinitionLoader::BlankSlateMessageRecorder
- Defined in:
- lib/theatre/callback_definition_loader.rb
Instance Method Summary collapse
- #each(&callback) ⇒ Object
-
#initialize(¬ify_on_completion) ⇒ BlankSlateMessageRecorder
constructor
A new instance of BlankSlateMessageRecorder.
- #method_missing(*method_name_and_args) ⇒ Object
Constructor Details
#initialize(¬ify_on_completion) ⇒ BlankSlateMessageRecorder
Returns a new instance of BlankSlateMessageRecorder.
66 67 68 69 |
# File 'lib/theatre/callback_definition_loader.rb', line 66 def initialize(¬ify_on_completion) @notify_on_completion = notify_on_completion @namespaces = [] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*method_name_and_args) ⇒ Object
71 72 73 74 75 |
# File 'lib/theatre/callback_definition_loader.rb', line 71 def method_missing(*method_name_and_args) raise ArgumentError, "Supplying a block is not supported" if block_given? @namespaces << method_name_and_args self end |
Instance Method Details
#each(&callback) ⇒ Object
77 78 79 |
# File 'lib/theatre/callback_definition_loader.rb', line 77 def each(&callback) @notify_on_completion.call(@namespaces, callback) end |