Module: RubyHaze::Mixins::Proxy

Included in:
Config, GroupConfig, RubyHaze::MapConfig, DOProxy, NetworkConfig, QueueConfig, TopicConfig
Defined in:
lib/rubyhaze/mixins/proxy.rb

Defined Under Namespace

Modules: ClassMethods

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args, &blk) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/rubyhaze/mixins/proxy.rb', line 15

def method_missing(meth, *args, &blk)
  if proxy_object.respond_to? meth
    proxy_object.send meth, *args, &blk
  else
    super
  end
end

Instance Attribute Details

#proxy_objectObject (readonly)

Returns the value of attribute proxy_object.



9
10
11
# File 'lib/rubyhaze/mixins/proxy.rb', line 9

def proxy_object
  @proxy_object
end

Class Method Details

.included(base) ⇒ Object



5
6
7
# File 'lib/rubyhaze/mixins/proxy.rb', line 5

def self.included(base)
  base.extend ClassMethods
end

Instance Method Details

#respond_to?(meth) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/rubyhaze/mixins/proxy.rb', line 11

def respond_to?(meth)
  proxy_object.respond_to?(meth) || super
end