Class: FeedzirraPodcast::Parser::PodcastItem
- Inherits:
-
RSS2Item
- Object
- RSS2Item
- FeedzirraPodcast::Parser::PodcastItem
show all
- Defined in:
- lib/feedzirra-podcast/parser/podcast_item.rb
Instance Method Summary
collapse
Methods inherited from RSS2Item
#enclosure, #pubDate, #source
Instance Method Details
#dc_created ⇒ Object
81
82
83
84
85
|
# 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 ⇒ Object
93
94
95
|
# File 'lib/feedzirra-podcast/parser/podcast_item.rb', line 93
def dc_isReplacedBy
dc_is_replaced_by
end
|
#dc_modified ⇒ Object
87
88
89
90
91
|
# 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 ⇒ Object
58
59
60
61
62
63
64
65
|
# 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 ⇒ Object
48
49
50
51
52
|
# File 'lib/feedzirra-podcast/parser/podcast_item.rb', line 48
def itunes_duration
Periodic.parse(itunes_duration_string) if itunes_duration_string.present?
end
|
#itunes_explicit ⇒ Object
33
34
35
36
37
38
39
40
41
42
|
# 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 ⇒ Object
44
45
46
|
# File 'lib/feedzirra-podcast/parser/podcast_item.rb', line 44
def itunes_image
Struct.new(:href).new(itunes_image_href)
end
|
#itunes_is_closed_captioned ⇒ Object
Also known as:
itunes_isClosedCaptioned
67
68
69
70
71
72
73
74
|
# 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
|
#itunes_keywords ⇒ Object
54
55
56
|
# 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 ⇒ Object
77
78
79
|
# File 'lib/feedzirra-podcast/parser/podcast_item.rb', line 77
def itunes_order
itunes_order_string.to_f if itunes_order_string.present?
end
|