Class: FeedzirraPodcast::Parser::Podcast
- Inherits:
-
RSS2
- Object
- RSS2
- FeedzirraPodcast::Parser::Podcast
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_block ⇒ Object
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_complete ⇒ Object
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_explicit ⇒ Object
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_image ⇒ Object
41
42
43
|
# File 'lib/feedzirra-podcast/parser/podcast.rb', line 41
def itunes_image
Struct.new(:href).new(itunes_image_href)
end
|
#itunes_keywords ⇒ Object
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_owner ⇒ Object
35
36
37
38
39
|
# File 'lib/feedzirra-podcast/parser/podcast.rb', line 35
def itunes_owner
_email = itunes_owner_object ? itunes_owner_object.email : nil
_name = itunes_owner_object ? itunes_owner_object.name : nil
Struct.new(:email, :name).new(_email, _name)
end
|
#sy_update_base ⇒ Object
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_frequency ⇒ Object
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_period ⇒ Object
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
|