Class: Brocktail::API::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/brocktail/api/base.rb

Direct Known Subclasses

Events

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(credentials) ⇒ Base

Returns a new instance of Base.



6
7
8
# File 'lib/brocktail/api/base.rb', line 6

def initialize(credentials)
  @credentials = credentials
end

Instance Attribute Details

#credentialsObject (readonly)

Returns the value of attribute credentials.



4
5
6
# File 'lib/brocktail/api/base.rb', line 4

def credentials
  @credentials
end

Class Method Details

.api_model(klass) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/brocktail/api/base.rb', line 11

def api_model(klass)
  class_eval <<-END
    def api_model
      #{klass}
    end
  END
end