Class: Feed2Email::Entry
- Inherits:
-
Object
- Object
- Feed2Email::Entry
- Includes:
- Configurable, Loggable
- Defined in:
- lib/feed2email/entry.rb
Class Attribute Summary collapse
-
.last_email_sent_at ⇒ Object
Returns the value of attribute last_email_sent_at.
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#feed_data ⇒ Object
Returns the value of attribute feed_data.
-
#feed_uri ⇒ Object
Returns the value of attribute feed_uri.
Instance Method Summary collapse
Methods included from Loggable
Methods included from Configurable
Class Attribute Details
.last_email_sent_at ⇒ Object
Returns the value of attribute last_email_sent_at.
19 20 21 |
# File 'lib/feed2email/entry.rb', line 19 def last_email_sent_at @last_email_sent_at end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
25 26 27 |
# File 'lib/feed2email/entry.rb', line 25 def data @data end |
#feed_data ⇒ Object
Returns the value of attribute feed_data.
26 27 28 |
# File 'lib/feed2email/entry.rb', line 26 def feed_data @feed_data end |
#feed_uri ⇒ Object
Returns the value of attribute feed_uri.
27 28 29 |
# File 'lib/feed2email/entry.rb', line 27 def feed_uri @feed_uri end |
Instance Method Details
#process ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/feed2email/entry.rb', line 29 def process if missing_data? logger.warn 'Skipping entry with missing data...' return false end unless feed.old? logger.debug 'Skipping new feed entry...' save # record as seen return true end if old? logger.debug 'Skipping old entry...' return true end return send_mail end |