Module: Party::Proxy
- Defined in:
- lib/proxy_party.rb
Defined Under Namespace
Modules: ClassMethods, InstanceMethods Classes: Factory
Class Method Summary collapse
Instance Method Summary collapse
-
#method_missing(name, *args, &block) ⇒ Object
proxy to state.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
proxy to state
329 330 331 332 333 334 335 336 |
# File 'lib/proxy_party.rb', line 329 def method_missing(name, *args, &block) return if !self.class.proxies self.class.proxies.each do |proxi| proxy_obj = self.send proxi return proxy_obj.send(name, *args, &block) if proxy_obj.respond_to? :"#{name}" end super end |
Class Method Details
.included(base) ⇒ Object
20 21 22 23 |
# File 'lib/proxy_party.rb', line 20 def self.included(base) base.extend ClassMethods base.send :include, InstanceMethods end |