Feedzirra::FeedEntryUtilities

Public Instance Methods

id() click to toggle source

Returns the id of the entry or its url if not id is present, as some formats don't support it

# File lib/feedzirra/feed_entry_utilities.rb, line 18
def id
  @entry_id || @url
end
last_modified() click to toggle source
Alias for: published
parse_datetime(string) click to toggle source
# File lib/feedzirra/feed_entry_utilities.rb, line 7
def parse_datetime(string)
  begin
    DateTime.parse(string).feed_utils_to_gm_time
  rescue
    puts "DATE CAN'T BE PARSED: #{string}"
    nil
  end
end
published() click to toggle source
# File lib/feedzirra/feed_entry_utilities.rb, line 3
def published
  @published || @updated
end
Also aliased as: last_modified
published=(val) click to toggle source

Writter for published. By default, we keep the "oldest" publish time found.

# File lib/feedzirra/feed_entry_utilities.rb, line 24
def published=(val)
  parsed = parse_datetime(val)
  @published = parsed if !@published || parsed < @published
end
sanitize!() click to toggle source
# File lib/feedzirra/feed_entry_utilities.rb, line 36
def sanitize!
  self.title.sanitize!   if self.title
  self.author.sanitize!  if self.author
  self.summary.sanitize! if self.summary
  self.content.sanitize! if self.content
end
updated=(val) click to toggle source

Writter for udapted. By default, we keep the most recenet update time found.

# File lib/feedzirra/feed_entry_utilities.rb, line 31
def updated=(val)
  parsed = parse_datetime(val)
  @updated = parsed if !@updated || parsed > @updated
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.