Class: MediaFeed::Item
- Inherits:
-
Object
- Object
- MediaFeed::Item
- Defined in:
- lib/media_feed.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#enclosure ⇒ Object
Returns the value of attribute enclosure.
-
#link ⇒ Object
Returns the value of attribute link.
-
#pubDate ⇒ Object
Returns the value of attribute pubDate.
-
#thumbnail ⇒ Object
Returns the value of attribute thumbnail.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
166 167 168 |
# File 'lib/media_feed.rb', line 166 def description @description end |
#enclosure ⇒ Object
Returns the value of attribute enclosure.
166 167 168 |
# File 'lib/media_feed.rb', line 166 def enclosure @enclosure end |
#link ⇒ Object
Returns the value of attribute link.
166 167 168 |
# File 'lib/media_feed.rb', line 166 def link @link end |
#pubDate ⇒ Object
Returns the value of attribute pubDate.
166 167 168 |
# File 'lib/media_feed.rb', line 166 def pubDate @pubDate end |
#thumbnail ⇒ Object
Returns the value of attribute thumbnail.
166 167 168 |
# File 'lib/media_feed.rb', line 166 def thumbnail @thumbnail end |
#title ⇒ Object
Returns the value of attribute title.
166 167 168 |
# File 'lib/media_feed.rb', line 166 def title @title end |
Instance Method Details
#is_after?(last_date) ⇒ Boolean
176 177 178 |
# File 'lib/media_feed.rb', line 176 def is_after?(last_date) (last_date.nil? || pubDate.nil? || (pubDate > last_date)) end |
#to_s ⇒ Object
180 181 182 183 184 185 186 |
# File 'lib/media_feed.rb', line 180 def to_s "title #{title}\n" + "description #{description}\n" + "link #{link}\n" + "enclosure #{enclosure}\n" + "pubDate #{pubDate}\n" end |
#valid? ⇒ Boolean
168 169 170 171 172 173 174 |
# File 'lib/media_feed.rb', line 168 def valid? if title.nil? || link.nil? || enclosure.nil? false else true end end |