Class: FeedNotifier::Config
- Inherits:
-
Object
- Object
- FeedNotifier::Config
- Defined in:
- lib/feed_notifier/config.rb
Instance Attribute Summary collapse
-
#feed_urls ⇒ Object
Returns the value of attribute feed_urls.
-
#interval ⇒ Object
Returns the value of attribute interval.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Config
constructor
A new instance of Config.
- #log_path ⇒ Object
Constructor Details
#initialize(attrs = {}) ⇒ Config
Returns a new instance of Config.
20 21 22 23 |
# File 'lib/feed_notifier/config.rb', line 20 def initialize(attrs={}) @feed_urls = [] @interval = 60*2 end |
Instance Attribute Details
#feed_urls ⇒ Object
Returns the value of attribute feed_urls.
9 10 11 |
# File 'lib/feed_notifier/config.rb', line 9 def feed_urls @feed_urls end |
#interval ⇒ Object
Returns the value of attribute interval.
10 11 12 |
# File 'lib/feed_notifier/config.rb', line 10 def interval @interval end |
Class Method Details
.load(config_path) ⇒ Object
13 14 15 16 17 |
# File 'lib/feed_notifier/config.rb', line 13 def load(config_path) eval(File.read(config_path),binding) rescue RuntimeError => e FeedNotifier.logger.error "error loading config file #{e.}" end |
Instance Method Details
#log_path ⇒ Object
25 26 27 |
# File 'lib/feed_notifier/config.rb', line 25 def log_path STDOUT end |