Class: Feed2Mail::History
- Inherits:
-
Object
- Object
- Feed2Mail::History
- Defined in:
- lib/feed2mail/history.rb
Instance Method Summary collapse
- #<<(other) ⇒ Object
- #has?(uri) ⇒ Boolean
-
#initialize(config) ⇒ History
constructor
A new instance of History.
- #save! ⇒ Object
Constructor Details
Instance Method Details
#<<(other) ⇒ Object
18 19 20 |
# File 'lib/feed2mail/history.rb', line 18 def <<(other) @hist << other end |
#has?(uri) ⇒ Boolean
14 15 16 |
# File 'lib/feed2mail/history.rb', line 14 def has?(uri) @hist.include?(uri) ? true : false end |
#save! ⇒ Object
22 23 24 25 26 |
# File 'lib/feed2mail/history.rb', line 22 def save! File.open File.(@hist_file), 'w' do |h| h.write @hist.to_yaml end end |