Class: Admincredible::Resource
- Inherits:
-
Object
- Object
- Admincredible::Resource
- Defined in:
- lib/admincredible/resource.rb
Direct Known Subclasses
Admincredible::Resources::Backup, Admincredible::Resources::Compatibility, Admincredible::Resources::Extension, Admincredible::Resources::Oauth, Admincredible::Resources::Setting, Admincredible::Resources::Site, Admincredible::Resources::Upgrade
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
- #config ⇒ Object
- #connection ⇒ Object
-
#initialize(client, options = {}) ⇒ Resource
constructor
Initializes with a client.
Constructor Details
#initialize(client, options = {}) ⇒ Resource
Initializes with a client. You can use resource classes directly by passing and instance of Admincredible::Client
8 9 10 |
# File 'lib/admincredible/resource.rb', line 8 def initialize(client, ={}) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
3 4 5 |
# File 'lib/admincredible/resource.rb', line 3 def client @client end |
Instance Method Details
#config ⇒ Object
16 17 18 |
# File 'lib/admincredible/resource.rb', line 16 def config return client.config end |
#connection ⇒ Object
12 13 14 |
# File 'lib/admincredible/resource.rb', line 12 def connection return client.connection end |