Module: Herald::Watcher::Rss
- Defined in:
- lib/herald/watchers/rss.rb
Instance Attribute Summary collapse
-
#uris ⇒ Object
Returns the value of attribute uris.
Class Method Summary collapse
-
.included(base) ⇒ Object
lazy-load open-uri when this Module is used.
Instance Method Summary collapse
Instance Attribute Details
#uris ⇒ Object
Returns the value of attribute uris.
6 7 8 |
# File 'lib/herald/watchers/rss.rb', line 6 def uris @uris end |
Class Method Details
Instance Method Details
#cleanup ⇒ Object
23 |
# File 'lib/herald/watchers/rss.rb', line 23 def cleanup; end |
#parse_options(options) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/herald/watchers/rss.rb', line 14 def () @uris = Array(.delete(:from)) if @uris.empty? raise ArgumentError, "RSS source not specified in :from Hash" end @uris.map!{ |uri| URI.escape(uri) } end |
#prepare ⇒ Object
22 |
# File 'lib/herald/watchers/rss.rb', line 22 def prepare; end |
#to_s ⇒ Object
25 26 27 |
# File 'lib/herald/watchers/rss.rb', line 25 def to_s "Herald RSS Watcher, URIs: #{@uris}, Keywords: '#{@keywords}', Timer: #{@timer}, State: #{@keep_alive ? 'Watching' : 'Stopped'}" end |