Class: Kentaa::Api::Resources::Base
- Inherits:
-
Object
- Object
- Kentaa::Api::Resources::Base
- Defined in:
- lib/kentaa/api/resources/base.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(config, options = {}) ⇒ Base
constructor
A new instance of Base.
- #load ⇒ Object
- #loaded? ⇒ Boolean
Constructor Details
#initialize(config, options = {}) ⇒ Base
Returns a new instance of Base.
9 10 11 12 |
# File 'lib/kentaa/api/resources/base.rb', line 9 def initialize(config, = {}) @config = config @options = end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
7 8 9 |
# File 'lib/kentaa/api/resources/base.rb', line 7 def config @config end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'lib/kentaa/api/resources/base.rb', line 7 def @options end |
Instance Method Details
#load ⇒ Object
14 15 16 17 18 |
# File 'lib/kentaa/api/resources/base.rb', line 14 def load @response ||= load_resource() self end |
#loaded? ⇒ Boolean
20 21 22 |
# File 'lib/kentaa/api/resources/base.rb', line 20 def loaded? !@response.nil? end |