Class: Panda::Proxy
- Inherits:
-
Object
- Object
- Panda::Proxy
- Includes:
- Builders::CreateBuilder, 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
- #end_class_name ⇒ Object
-
#initialize(parent, klass) ⇒ Proxy
constructor
A new instance of Proxy.
Methods included from CloudConnection
Methods included from Builders::CreateBuilder
Methods included from Finders::FindOne
#find, #find_by_path, #find_object_by_path
Methods included from Finders::FindMany
Methods included from Router::ClassMethods
#build_hash_many_path, #element_params, #full_object_url, #many_path, #match, #object_url, #one_path, #resource_path
Constructor Details
#initialize(parent, klass) ⇒ Proxy
Returns a new instance of Proxy.
11 12 13 14 |
# File 'lib/panda/proxies/proxy.rb', line 11 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.
9 10 11 |
# File 'lib/panda/proxies/proxy.rb', line 9 def klass @klass end |
#parent ⇒ Object
Returns the value of attribute parent.
9 10 11 |
# File 'lib/panda/proxies/proxy.rb', line 9 def parent @parent end |
Instance Method Details
#cloud ⇒ Object
16 17 18 |
# File 'lib/panda/proxies/proxy.rb', line 16 def cloud @parent.is_a?(Cloud) ? @parent : @parent.cloud end |
#end_class_name ⇒ Object
20 21 22 |
# File 'lib/panda/proxies/proxy.rb', line 20 def end_class_name klass.end_class_name end |