Class: Myzofeedtosis::Result
- Inherits:
-
Object
- Object
- Myzofeedtosis::Result
- Defined in:
- lib/myzofeedtosis/result.rb
Overview
Makes the response components both from the Curl::Easy object and the FeedNormalizer::Feed object available to the user by delegating appropriate method calls to the correct object. If FeedNormalizer wasn’t able to process the response, calls which would be delegated to this object return nil. In these cases, depending on your business logic you may want to inspect the state of the Curl::Easy object by using methods forwarded to it.
Constant Summary collapse
- FEED_METHODS =
Methods which should be delegated to the FeedNormalizer::Feed object.
[ :title, :description, :last_updated, :copyright, :authors, :author, :urls, :url, :image, :generator, :items, :entries, :new_items, :new_entries, :channel, :ttl, :skip_hours, :skip_days ]
- SETTER_METHOD_RE =
Precompiled regexp for detecting removing setter methods from collection of methods to be delegated to the Curl::Easy object.
/=$/o
Instance Method Summary collapse
-
#initialize(curl, feed) ⇒ Result
constructor
A new instance of Result.
Constructor Details
#initialize(curl, feed) ⇒ Result
Returns a new instance of Result.
21 22 23 24 25 26 |
# File 'lib/myzofeedtosis/result.rb', line 21 def initialize(curl, feed) @curl = curl @feed = feed raise ArgumentError, "Curl object must not be nil" if curl.nil? end |