Class: KegbotApi::RestNoun

Inherits:
Object
  • Object
show all
Includes:
RestNounAttributes
Defined in:
lib/kegbot_api/nouns/rest_noun.rb

Overview

Base class of all REST nouns (types) in the Kegbot REST API.

Direct Known Subclasses

Image, KegSize, RemoteRestNoun

Class Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ RestNoun

Returns a new instance of RestNoun.



10
11
12
# File 'lib/kegbot_api/nouns/rest_noun.rb', line 10

def initialize(attributes = {})
  self.attributes = attributes
end

Class Attribute Details

.clientClient

Returns:



24
25
26
# File 'lib/kegbot_api/nouns/rest_noun.rb', line 24

def client
  @client
end

.nounObject

Returns the value of attribute noun.



25
26
27
# File 'lib/kegbot_api/nouns/rest_noun.rb', line 25

def noun
  @noun
end

Instance Method Details

#clientClient

Returns a Client client configured for this class

Returns:



16
17
18
# File 'lib/kegbot_api/nouns/rest_noun.rb', line 16

def client
  self.class.client
end