Class: Frontier::Proxy
- Inherits:
-
Object
- Object
- Frontier::Proxy
- Defined in:
- lib/frontier/proxy.rb
Instance Attribute Summary collapse
-
#channel ⇒ Object
Returns the value of attribute channel.
Instance Method Summary collapse
-
#initialize(object) ⇒ Proxy
constructor
A new instance of Proxy.
- #inspect ⇒ Object
- #method_missing(name, *args) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(object) ⇒ Proxy
Returns a new instance of Proxy.
7 8 9 10 |
# File 'lib/frontier/proxy.rb', line 7 def initialize(object) @typename = object.class.to_s @object = object.object_id end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object
12 13 14 15 |
# File 'lib/frontier/proxy.rb', line 12 def method_missing(name, *args) request = { :object => @object, :name => name, :args => args } return @channel.submit(request) end |
Instance Attribute Details
#channel ⇒ Object
Returns the value of attribute channel.
5 6 7 |
# File 'lib/frontier/proxy.rb', line 5 def channel @channel end |
Instance Method Details
#inspect ⇒ Object
21 22 23 |
# File 'lib/frontier/proxy.rb', line 21 def inspect "#<Frontier::Proxy #{method_missing(:inspect)}>" end |
#to_s ⇒ Object
17 18 19 |
# File 'lib/frontier/proxy.rb', line 17 def to_s method_missing(:to_s) end |