Module: BitsOnTheRun

Extended by:
Configuration
Defined in:
lib/bitsontherun.rb,
lib/bitsontherun/api.rb,
lib/bitsontherun/call.rb,
lib/bitsontherun/store.rb,
lib/bitsontherun/parser.rb,
lib/bitsontherun/version.rb,
lib/bitsontherun/response.rb,
lib/bitsontherun/configuration.rb

Defined Under Namespace

Modules: Configuration, Parser Classes: API, Base, Call, Response, Store

Constant Summary collapse

PROTOCOL =
"http"
URL =
"api.bitsontherun.com"
API_VERSION =
"v1"
VERSION =
"0.1.2"

Instance Attribute Summary

Attributes included from Configuration

#key, #secret

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Configuration

format

Class Method Details

.call(method, params = {}) ⇒ Object



58
59
60
61
62
# File 'lib/bitsontherun.rb', line 58

def call(method, params = {})
  adapter = API.new(:call)
  adapter.method(method, params)
  adapter.execute
end

.store(method, filename, params = {}) ⇒ Object



64
65
66
67
68
69
# File 'lib/bitsontherun.rb', line 64

def store(method, filename, params = {})
  adapter = API.new(:store)
  adapter.method(method, params)
  adapter.file(filename)
  adapter.execute
end

Instance Method Details

#configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (BitsOnTheRun)

    the object that the method was called on



53
54
55
# File 'lib/bitsontherun.rb', line 53

def configure
  yield self if block_given?
end