Class: BitsOnTheRun::Store
Instance Method Summary collapse
- #execute ⇒ Object
- #file(filename) ⇒ Object
-
#initialize ⇒ Store
constructor
A new instance of Store.
Methods inherited from Base
Constructor Details
#initialize ⇒ Store
Returns a new instance of Store.
3 4 5 6 7 8 9 |
# File 'lib/bitsontherun/store.rb', line 3 def initialize @response = nil @defaults = { :api_format => BitsOnTheRun.format } super end |
Instance Method Details
#execute ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/bitsontherun/store.rb', line 15 def execute build_token file = Curl::PostField.file("file", @filename) response = Curl::Easy.http_post(build_store_url, file) do |curl| curl.multipart_form_post = true end.body_str Response.new(response) end |
#file(filename) ⇒ Object
11 12 13 |
# File 'lib/bitsontherun/store.rb', line 11 def file(filename) @filename = filename.to_s end |