Class: Nestling::Base
- Inherits:
-
Object
- Object
- Nestling::Base
- Defined in:
- lib/nestling/base.rb
Constant Summary collapse
- METHOD_PREFIX =
""
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(client) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(client) ⇒ Base
Returns a new instance of Base.
36 37 38 |
# File 'lib/nestling/base.rb', line 36 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
3 4 5 |
# File 'lib/nestling/base.rb', line 3 def client @client end |
Class Method Details
.define_api_methods(methods) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/nestling/base.rb', line 8 def define_api_methods(methods) methods.each do |key, definition| if definition[:collection] define_api_method_returning_collection(key, definition) else define_api_method(key, definition) end end end |