Class: QueueryClient::UrlManifestFile
- Inherits:
-
ManifestFile
- Object
- ManifestFile
- QueueryClient::UrlManifestFile
- Defined in:
- lib/queuery_client/url_manifest_file.rb
Instance Attribute Summary collapse
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(url) ⇒ UrlManifestFile
constructor
A new instance of UrlManifestFile.
- #key ⇒ Object
- #open ⇒ Object
Methods inherited from ManifestFile
#column_types, #manifest_object?
Constructor Details
#initialize(url) ⇒ UrlManifestFile
Returns a new instance of UrlManifestFile.
8 9 10 |
# File 'lib/queuery_client/url_manifest_file.rb', line 8 def initialize(url) @url = url end |
Instance Attribute Details
#url ⇒ Object (readonly)
Returns the value of attribute url.
12 13 14 |
# File 'lib/queuery_client/url_manifest_file.rb', line 12 def url @url end |
Instance Method Details
#key ⇒ Object
14 15 16 |
# File 'lib/queuery_client/url_manifest_file.rb', line 14 def key @url.path end |
#open ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/queuery_client/url_manifest_file.rb', line 18 def open http = Net::HTTP.new(@url.host, @url.port) http.use_ssl = (@url.scheme.downcase == 'https') content = http.start { res = http.get(@url.request_uri) res.body } StringIO.new(content) end |