Class: GetFilmInfoFullHandler
- Inherits:
-
Object
- Object
- GetFilmInfoFullHandler
- Defined in:
- lib/filmweb_api/method_handlers/get_film_info_full_handler.rb
Constant Summary collapse
- REQUEST_ATTRIBUTES =
[ :movie_id ].freeze
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#movie_id ⇒ Object
readonly
Returns the value of attribute movie_id.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(**attributes) ⇒ GetFilmInfoFullHandler
constructor
A new instance of GetFilmInfoFullHandler.
Constructor Details
#initialize(**attributes) ⇒ GetFilmInfoFullHandler
Returns a new instance of GetFilmInfoFullHandler.
35 36 37 38 |
# File 'lib/filmweb_api/method_handlers/get_film_info_full_handler.rb', line 35 def initialize(**attributes) @attributes = attributes @movie_id = attributes[:movie_id] end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
33 34 35 |
# File 'lib/filmweb_api/method_handlers/get_film_info_full_handler.rb', line 33 def attributes @attributes end |
#movie_id ⇒ Object (readonly)
Returns the value of attribute movie_id.
33 34 35 |
# File 'lib/filmweb_api/method_handlers/get_film_info_full_handler.rb', line 33 def movie_id @movie_id end |
Instance Method Details
#call ⇒ Object
40 41 42 43 |
# File 'lib/filmweb_api/method_handlers/get_film_info_full_handler.rb', line 40 def call raise ArgumentError.new("You need to pass all required attributes for that method") unless all_required_attributes? Hash[RESPONSE_KEYS.zip(filmweb_response)] end |