Class: BitsOnTheRun::Call

Inherits:
Base
  • Object
show all
Defined in:
lib/bitsontherun/call.rb

Instance Method Summary collapse

Methods inherited from Base

#method

Constructor Details

#initializeCall

Returns a new instance of Call.



6
7
8
9
10
11
12
13
14
15
# File 'lib/bitsontherun/call.rb', line 6

def initialize
  @defaults = {
    :api_nonce => "%08d" % rand(99999999),
    :api_timestamp => Time.now.to_i,
    :api_key => BitsOnTheRun.key,
    :api_format => BitsOnTheRun.format,
    :api_kit => "ruby-%s" % VERSION
  }
  super
end

Instance Method Details

#executeObject



17
18
19
20
# File 'lib/bitsontherun/call.rb', line 17

def execute
  response = Curl::Easy.perform(build_url).body_str
  Response.new(response)
end