Class: URI::Uri
- Inherits:
-
Object
- Object
- URI::Uri
- Defined in:
- lib/bbc/uri.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
Returns the value of attribute response.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
-
#initialize(uri) ⇒ Uri
constructor
A new instance of Uri.
Constructor Details
#initialize(uri) ⇒ Uri
Returns a new instance of Uri.
8 9 10 11 12 13 14 |
# File 'lib/bbc/uri.rb', line 8 def initialize(uri) @uri = uri http = Net::HTTP.new(@uri.host, @uri.port) http.use_ssl = false http.verify_mode = OpenSSL::SSL::VERIFY_NONE @response = http.get(@uri.request_uri) end |
Instance Attribute Details
#response ⇒ Object
Returns the value of attribute response.
6 7 8 |
# File 'lib/bbc/uri.rb', line 6 def response @response end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
5 6 7 |
# File 'lib/bbc/uri.rb', line 5 def uri @uri end |