Sha256: b8c70b6df2846acebb89bbda0ee8fca1e9f4ca414c5dac42763e9a99c37441db

Contents?: true

Size: 685 Bytes

Versions: 1

Compression:

Stored size: 685 Bytes

Contents

require 'net/https'
require 'kegbot_api/rest_response'
require 'kegbot_api/nouns/rest_noun_attributes'

module KegbotApi
  # Base class of all REST nouns (types) in the Kegbot REST API.
  class RestNoun
    include RestNounAttributes

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

    # Returns a {Client} client configured for this class
    # @return [Client]
    def client
      self.class.client
    end

    # Class Methods

    class << self
      # @return [Client]
      attr_accessor :client
      attr_accessor :noun

      def client=(client)
        @client = client
      end

      def client
        @client
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kegbot_api-0.0.1 lib/kegbot_api/nouns/rest_noun.rb