class FeedzirraPodcast::Parser::PodcastItem

Public Instance Methods

dc_created() click to toggle source
# File lib/feedzirra-podcast/parser/podcast_item.rb, line 81
def dc_created
  Time.parse(dc_created_string).utc if dc_created_string.present?
rescue ArgumentError
  nil
end
dc_isReplacedBy() click to toggle source
# File lib/feedzirra-podcast/parser/podcast_item.rb, line 93
def dc_isReplacedBy
  dc_is_replaced_by
end
dc_modified() click to toggle source
# File lib/feedzirra-podcast/parser/podcast_item.rb, line 87
def dc_modified
  Time.parse(dc_modified_string).utc if dc_modified_string.present?
rescue ArgumentError
  nil
end
itunes_block() click to toggle source
# File lib/feedzirra-podcast/parser/podcast_item.rb, line 58
def itunes_block
  case itunes_block_string
  when "yes"
    true
  else
    false
  end
end
itunes_duration() click to toggle source
# File lib/feedzirra-podcast/parser/podcast_item.rb, line 48
def itunes_duration
  Periodic.parse(itunes_duration_string) if itunes_duration_string.present?
# rescue
#   nil
end
itunes_explicit() click to toggle source
# File lib/feedzirra-podcast/parser/podcast_item.rb, line 33
def itunes_explicit
  case itunes_explicit_string
  when "yes"
    true
  when "clean"
    :clean
  else
    false
  end
end
itunes_image() click to toggle source
# File lib/feedzirra-podcast/parser/podcast_item.rb, line 44
def itunes_image
  Struct.new(:href).new(itunes_image_href)
end
itunes_isClosedCaptioned()
itunes_is_closed_captioned() click to toggle source
# File lib/feedzirra-podcast/parser/podcast_item.rb, line 67
def itunes_is_closed_captioned
  case itunes_is_closed_captioned_string
  when "yes"
    true
  else
    false
  end
end
Also aliased as: itunes_isClosedCaptioned
itunes_keywords() click to toggle source
# File lib/feedzirra-podcast/parser/podcast_item.rb, line 54
def itunes_keywords
  itunes_keywords_string.split(',').map(&:strip) if itunes_keywords_string.present?
end
itunes_order() click to toggle source
# File lib/feedzirra-podcast/parser/podcast_item.rb, line 77
def itunes_order
  itunes_order_string.to_f if itunes_order_string.present?
end