Class: RubyBHL::Response
- Inherits:
-
Object
- Object
- RubyBHL::Response
- Defined in:
- lib/rubyBHL/response.rb
Instance Attribute Summary collapse
-
#json ⇒ Object
readonly
Returns the value of attribute json.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(options = {}) ⇒ Response
Returns a new instance of Response.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/rubyBHL/response.rb', line 7 def initialize( = {}) opts = { request: nil }.merge!() raise if opts[:request].nil? || opts[:request].class != RubyBHL::Request @json = {} @json = JSON.parse(Net::HTTP.get_response(URI.parse(opts[:request].search_url)).body) end |
Instance Attribute Details
#json ⇒ Object (readonly)
Returns the value of attribute json.
5 6 7 |
# File 'lib/rubyBHL/response.rb', line 5 def json @json end |