Class: GembankClient::Resource
- Inherits:
-
Object
- Object
- GembankClient::Resource
- Defined in:
- lib/gembank_client/resource.rb
Instance Method Summary collapse
-
#initialize(key, file, url) ⇒ Resource
constructor
A new instance of Resource.
- #release ⇒ Object
Constructor Details
#initialize(key, file, url) ⇒ Resource
Returns a new instance of Resource.
5 6 7 |
# File 'lib/gembank_client/resource.rb', line 5 def initialize(key, file, url) @key, @file, @url = key, file, url end |
Instance Method Details
#release ⇒ Object
9 10 11 12 13 |
# File 'lib/gembank_client/resource.rb', line 9 def release RestClient.post(url, :gem => File.new(@file)) do |response, request, result, &block| handle(response, request, result, &block) end end |