Class: Admincredible::Resource

Inherits:
Object
  • Object
show all
Defined in:
lib/admincredible/resource.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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, options={})
  @client = client
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



3
4
5
# File 'lib/admincredible/resource.rb', line 3

def client
  @client
end

Instance Method Details

#configObject



16
17
18
# File 'lib/admincredible/resource.rb', line 16

def config
  return client.config
end

#connectionObject



12
13
14
# File 'lib/admincredible/resource.rb', line 12

def connection
  return client.connection
end