Class: Feed2Mail::Config
- Inherits:
-
Object
- Object
- Feed2Mail::Config
- Defined in:
- lib/feed2mail/config.rb
Instance Attribute Summary collapse
-
#feeds ⇒ Object
readonly
Returns the value of attribute feeds.
-
#hist_file ⇒ Object
Returns the value of attribute hist_file.
-
#verbose ⇒ Object
Returns the value of attribute verbose.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #load(file = CONFIG_PATH) ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
8 9 10 |
# File 'lib/feed2mail/config.rb', line 8 def initialize @feeds = [] end |
Instance Attribute Details
#feeds ⇒ Object (readonly)
Returns the value of attribute feeds.
5 6 7 |
# File 'lib/feed2mail/config.rb', line 5 def feeds @feeds end |
#hist_file ⇒ Object
Returns the value of attribute hist_file.
6 7 8 |
# File 'lib/feed2mail/config.rb', line 6 def hist_file @hist_file end |
#verbose ⇒ Object
Returns the value of attribute verbose.
6 7 8 |
# File 'lib/feed2mail/config.rb', line 6 def verbose @verbose end |
Instance Method Details
#load(file = CONFIG_PATH) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/feed2mail/config.rb', line 12 def load(file = CONFIG_PATH) @rc = YAML.load_file(File.(file)) @rc['feeds'].each do |f| @feeds << Feed.new(f['uri']) end end |