Class: Ruote::ParticipantRegistrationProxy
- Inherits:
-
Object
- Object
- Ruote::ParticipantRegistrationProxy
- Defined in:
- lib/ruote/engine.rb
Overview
Engine#register uses this proxy when it's passed a block.
Originally written by Torsten Schoenebaum for ruote-kit.
Instance Method Summary (collapse)
- - (Object) catchall(*args)
-
- (ParticipantRegistrationProxy) initialize(engine)
constructor
A new instance of ParticipantRegistrationProxy.
-
- (Object) method_missing(method_name, *args)
Maybe a bit audacious…
- - (Object) participant(name, klass = nil, options = {}, &block)
Constructor Details
- (ParticipantRegistrationProxy) initialize(engine)
A new instance of ParticipantRegistrationProxy
858 859 860 861 |
# File 'lib/ruote/engine.rb', line 858 def initialize(engine) @engine = engine end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
- (Object) method_missing(method_name, *args)
Maybe a bit audacious…
878 879 880 881 |
# File 'lib/ruote/engine.rb', line 878 def method_missing(method_name, *args) participant(method_name, *args) end |
Instance Method Details
- (Object) catchall(*args)
868 869 870 871 872 873 874 |
# File 'lib/ruote/engine.rb', line 868 def catchall(*args) klass = args.empty? ? Ruote::StorageParticipant : args.first = args[1] || {} participant('.+', klass, ) end |
- (Object) participant(name, klass = nil, options = {}, &block)
863 864 865 866 |
# File 'lib/ruote/engine.rb', line 863 def participant(name, klass=nil, ={}, &block) @engine.register_participant(name, klass, , &block) end |