Class: Jani::ConverterClient::Response
- Inherits:
-
Object
- Object
- Jani::ConverterClient::Response
- Extended by:
- Forwardable
- Defined in:
- lib/jani/converter_client/response.rb
Instance Attribute Summary collapse
-
#movie ⇒ Object
readonly
Returns the value of attribute movie.
Instance Method Summary collapse
-
#initialize(http_response) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(http_response) ⇒ Response
Returns a new instance of Response.
9 10 11 12 13 14 15 16 17 |
# File 'lib/jani/converter_client/response.rb', line 9 def initialize(http_response) @http_response = http_response @movie = if success? Jani::FromJson.to_movie(http_response.body) else Jani::FromJson.empty_movie end end |
Instance Attribute Details
#movie ⇒ Object (readonly)
Returns the value of attribute movie.
6 7 8 |
# File 'lib/jani/converter_client/response.rb', line 6 def movie @movie end |