Module: JIJI::Agent::Shared
- Defined in:
- lib/jiji/agent/agent_registry.rb
Constant Summary collapse
- @@deleates =
{}
Class Method Summary collapse
Class Method Details
._delegates ⇒ Object
35 36 37 |
# File 'lib/jiji/agent/agent_registry.rb', line 35 def self._delegates @@deleates end |
.const_missing(id) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/jiji/agent/agent_registry.rb', line 13 def self.const_missing(id) super unless @@deleates result = nil @@deleates.each_pair{|k,v| if v.const_defined?(id) result = v.const_get(id) break end } result ? result : super end |
.method_missing(name, *args, &block) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/jiji/agent/agent_registry.rb', line 24 def self.method_missing(name,*args, &block) super unless @@deleates target = nil @@deleates.each_pair{|k,v| if v.respond_to?(name) target = v break end } target ? target.send( name, *args, &block ) : super end |