Module: Kinu

Defined in:
lib/kinu.rb,
lib/kinu/errors.rb,
lib/kinu/sandbox.rb,
lib/kinu/version.rb,
lib/kinu/geometry.rb,
lib/kinu/resource.rb,
lib/kinu/http_client.rb,
lib/kinu/configuration.rb,
lib/kinu/resource_base.rb

Defined Under Namespace

Classes: BadRequestError, ClientError, Configuration, Geometry, HttpClient, HttpError, Resource, ResourceBase, Sandbox, ServerError

Constant Summary collapse

USER_AGENT =
"KinuRubyClient/#{Kinu::VERSION}".freeze
VERSION =
"2.0.2"

Class Method Summary collapse

Class Method Details

.base_upload_uriObject



15
16
17
18
19
# File 'lib/kinu.rb', line 15

def self.base_upload_uri
  host = config.upload_host || config.host
  raise "Kinu.config.upload_host and Kinu.config.upload_host is not set. Please set one or the other." unless host
  http_class.build(host: host, port: config.port)
end

.base_uriObject



10
11
12
13
# File 'lib/kinu.rb', line 10

def self.base_uri
  raise "Kinu.config.host is not set." unless config.host
  http_class.build(host: config.host, port: config.port)
end

.configObject



25
26
27
# File 'lib/kinu.rb', line 25

def self.config
  @config ||= Configuration.new
end

.configure {|config| ... } ⇒ Object

Yields:



21
22
23
# File 'lib/kinu.rb', line 21

def self.configure
  yield config
end