Class: Entry

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/entry.rb

Instance Method Summary collapse

Instance Method Details

#date_publishedObject



18
19
20
# File 'lib/entry.rb', line 18

def date_published
  self['date_published'] || self.created_at
end

#is_new?Boolean

Returns:

  • (Boolean)


7
8
9
10
11
12
13
14
15
16
# File 'lib/entry.rb', line 7

def is_new?
  LOGGER.debug("is_new?")
  LOGGER.debug(self.title)
  LOGGER.debug(self.date_published.to_s)
  LOGGER.debug(self.date_published.class.to_s)
  LOGGER.debug(self.feed.previously_updated_at.to_s)
  LOGGER.debug(self.feed.previously_updated_at.class.to_s)
  LOGGER.debug( (self.date_published > self.feed.previously_updated_at).to_s )
  self.date_published >= self.feed.previously_updated_at
end