Class: Mediaman::Trakt::Fetcher
- Inherits:
-
Hash
- Object
- Hash
- Mediaman::Trakt::Fetcher
- Includes:
- HTTParty
- Defined in:
- lib/mediaman/trakt.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#response ⇒ Object
Returns the value of attribute response.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Fetcher
constructor
A new instance of Fetcher.
Constructor Details
#initialize(options = {}) ⇒ Fetcher
Returns a new instance of Fetcher.
26 27 28 29 |
# File 'lib/mediaman/trakt.rb', line 26 def initialize( = {}) self. = self.merge!(fetch! || {}) if self.respond_to?(:fetch!) end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
30 31 32 |
# File 'lib/mediaman/trakt.rb', line 30 def @options end |
#response ⇒ Object
Returns the value of attribute response.
31 32 33 |
# File 'lib/mediaman/trakt.rb', line 31 def response @response end |
Class Method Details
.from_hash(hash = {}) ⇒ Object
20 21 22 23 24 |
# File 'lib/mediaman/trakt.rb', line 20 def self.from_hash(hash = {}) f = self.new() f.merge!(hash) if hash.present? f end |