Class: PhoneGap::Build::PackageDownloader
- Inherits:
-
Object
- Object
- PhoneGap::Build::PackageDownloader
- Defined in:
- lib/phone_gap/build/package_downloader.rb
Instance Attribute Summary collapse
-
#http_response ⇒ Object
readonly
Returns the value of attribute http_response.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#platform ⇒ Object
readonly
Returns the value of attribute platform.
-
#target_dir ⇒ Object
readonly
Returns the value of attribute target_dir.
Instance Method Summary collapse
Instance Attribute Details
#http_response ⇒ Object (readonly)
Returns the value of attribute http_response.
5 6 7 |
# File 'lib/phone_gap/build/package_downloader.rb', line 5 def http_response @http_response end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/phone_gap/build/package_downloader.rb', line 5 def id @id end |
#platform ⇒ Object (readonly)
Returns the value of attribute platform.
5 6 7 |
# File 'lib/phone_gap/build/package_downloader.rb', line 5 def platform @platform end |
#target_dir ⇒ Object (readonly)
Returns the value of attribute target_dir.
5 6 7 |
# File 'lib/phone_gap/build/package_downloader.rb', line 5 def target_dir @target_dir end |
Instance Method Details
#download(id, platform, target_dir = '/tmp') ⇒ Object
7 8 9 10 11 |
# File 'lib/phone_gap/build/package_downloader.rb', line 7 def download(id, platform, target_dir = '/tmp') @id, @platform, @target_dir = id, platform, target_dir @http_response = PhoneGap::Build::ApiRequest.new.get("/apps/#{id}/#{platform}") save_file if http_response.success? end |