Class: Panda::Proxy
- Inherits:
-
Object
- Object
- Panda::Proxy
- Includes:
- Builders::ClassMethods, CloudConnection, Finders::FindMany, Finders::FindOne, Router::ClassMethods
- Defined in:
- lib/panda/proxies/proxy.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#klass ⇒ Object
Returns the value of attribute klass.
-
#parent ⇒ Object
Returns the value of attribute parent.
Instance Method Summary collapse
- #cloud ⇒ Object
-
#initialize(parent, klass) ⇒ Proxy
constructor
A new instance of Proxy.
- #sti_name ⇒ Object
Methods included from CloudConnection
Methods included from Finders::FindOne
#find, #find_by_path, #find_object_by_path
Methods included from Finders::FindMany
Methods included from Builders::ClassMethods
Methods included from Router::ClassMethods
#build_hash_many_path, #create_rest_url, #many_path, #match, #one_path, #resource_path
Constructor Details
#initialize(parent, klass) ⇒ Proxy
Returns a new instance of Proxy.
13 14 15 16 |
# File 'lib/panda/proxies/proxy.rb', line 13 def initialize(parent, klass) @parent = parent @klass = klass end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Panda::Finders::FindMany
Instance Attribute Details
#klass ⇒ Object
Returns the value of attribute klass.
11 12 13 |
# File 'lib/panda/proxies/proxy.rb', line 11 def klass @klass end |
#parent ⇒ Object
Returns the value of attribute parent.
11 12 13 |
# File 'lib/panda/proxies/proxy.rb', line 11 def parent @parent end |
Instance Method Details
#cloud ⇒ Object
18 19 20 |
# File 'lib/panda/proxies/proxy.rb', line 18 def cloud @parent.is_a?(Cloud) ? @parent : @parent.cloud end |
#sti_name ⇒ Object
22 23 24 |
# File 'lib/panda/proxies/proxy.rb', line 22 def sti_name klass.sti_name end |