Class: FeedzirraPodcast::Parser::Podcast

Inherits:
RSS2
  • Object
show all
Defined in:
lib/feedzirra-podcast/parser/podcast.rb

Instance Attribute Summary

Attributes inherited from RSS2

#feed_url

Instance Method Summary collapse

Methods inherited from RSS2

able_to_parse?, #feedburner?, #image, #lastBuildDate, #managing_editor, #pubDate, #web_master

Instance Method Details

#itunes_blockObject



60
61
62
63
64
65
66
67
# File 'lib/feedzirra-podcast/parser/podcast.rb', line 60

def itunes_block
  case itunes_block_string
  when "yes"
    true
  else
    false
  end
end

#itunes_completeObject



69
70
71
72
73
74
75
76
# File 'lib/feedzirra-podcast/parser/podcast.rb', line 69

def itunes_complete
  case itunes_complete_string
  when "yes"
    true
  else
    false
  end
end

#itunes_explicitObject



45
46
47
48
49
50
51
52
53
54
# File 'lib/feedzirra-podcast/parser/podcast.rb', line 45

def itunes_explicit
  case itunes_explicit_string
  when "yes"
    true
  when "clean"
    :clean
  else
    false
  end
end

#itunes_imageObject



41
42
43
# File 'lib/feedzirra-podcast/parser/podcast.rb', line 41

def itunes_image
  Struct.new(:href).new(itunes_image_href)
end

#itunes_keywordsObject



56
57
58
# File 'lib/feedzirra-podcast/parser/podcast.rb', line 56

def itunes_keywords
  itunes_keywords_string.split(',').map(&:strip) if itunes_keywords_string.present?
end

#itunes_ownerObject



35
36
37
38
39
# File 'lib/feedzirra-podcast/parser/podcast.rb', line 35

def itunes_owner
   = itunes_owner_object ? itunes_owner_object.email : nil
  _name = itunes_owner_object ? itunes_owner_object.name : nil
  Struct.new(:email, :name).new(, _name)
end

#sy_update_baseObject Also known as: sy_updateBase



95
96
97
# File 'lib/feedzirra-podcast/parser/podcast.rb', line 95

def sy_update_base
  Time.parse(sy_update_base_string) if sy_update_base_string.present?
end

#sy_update_frequencyObject Also known as: sy_updateFrequency



90
91
92
# File 'lib/feedzirra-podcast/parser/podcast.rb', line 90

def sy_update_frequency
  sy_update_frequency_string.to_i if sy_update_frequency_string
end

#sy_update_periodObject Also known as: sy_updatePeriod



78
79
80
81
82
83
84
85
86
87
# File 'lib/feedzirra-podcast/parser/podcast.rb', line 78

def sy_update_period
  case sy_update_period_string
    when "hourly" then :hourly
    when "daily" then :daily
    when "weekly" then :weekly
    when "monthly" then :monthly
    when "yearly" then :yearly
    else nil
  end
end