Module: Bettery

Extended by:
Configurable
Defined in:
lib/bettery.rb,
lib/bettery/error.rb,
lib/bettery/client.rb,
lib/bettery/default.rb,
lib/bettery/project.rb,
lib/bettery/version.rb,
lib/bettery/configurable.rb,
lib/bettery/client/projects.rb

Overview

Ruby toolkit for the Betterplace API

Defined Under Namespace

Modules: Configurable, Default Classes: BadGateway, BadRequest, Client, ClientError, Error, Forbidden, InternalServerError, NotFound, Project, ServerError, ServiceUnavailable

Constant Summary collapse

VERSION =
"0.0.1"

Instance Attribute Summary

Attributes included from Configurable

#api_base_endpoint, #connection_options, #default_media_type, #locale, #middleware, #per_page, #proxy, #user_agent

Class Method Summary collapse

Methods included from Configurable

configure, keys, reset!

Class Method Details

.clientBettery::Client

API client based on configured options Configurable

Returns:



12
13
14
15
16
17
# File 'lib/bettery.rb', line 12

def client
  unless defined?(@client) && @client.same_options?(options)
    @client = Bettery::Client.new(options)
  end
  @client
end