Class: MediaRss::Item
- Inherits:
-
Object
- Object
- MediaRss::Item
- Defined in:
- lib/media_rss/models/item.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#description ⇒ Object
Returns the value of attribute description.
-
#guid ⇒ Object
Returns the value of attribute guid.
-
#link ⇒ Object
Returns the value of attribute link.
-
#thumb ⇒ Object
Returns the value of attribute thumb.
-
#thumb_type ⇒ Object
Returns the value of attribute thumb_type.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(title, opts = {}) ⇒ Item
constructor
A new instance of Item.
Constructor Details
#initialize(title, opts = {}) ⇒ Item
Returns a new instance of Item.
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/media_rss/models/item.rb', line 7 def initialize(title, opts = {}) @title = title @link = opts[:link] @guid = opts[:guid] @description = opts[:description] @thumb = opts[:thumb] @thumb_type = opts[:thumb_type] @thumb_type ||= MediaRss.configuration[:default_thumb_type] @thumb_type ||= 'image/jpeg' @content = opts[:content] @content_type = opts[:content_type] end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
5 6 7 |
# File 'lib/media_rss/models/item.rb', line 5 def content @content end |
#content_type ⇒ Object
Returns the value of attribute content_type.
5 6 7 |
# File 'lib/media_rss/models/item.rb', line 5 def content_type @content_type end |
#description ⇒ Object
Returns the value of attribute description.
5 6 7 |
# File 'lib/media_rss/models/item.rb', line 5 def description @description end |
#guid ⇒ Object
Returns the value of attribute guid.
5 6 7 |
# File 'lib/media_rss/models/item.rb', line 5 def guid @guid end |
#link ⇒ Object
Returns the value of attribute link.
5 6 7 |
# File 'lib/media_rss/models/item.rb', line 5 def link @link end |
#thumb ⇒ Object
Returns the value of attribute thumb.
5 6 7 |
# File 'lib/media_rss/models/item.rb', line 5 def thumb @thumb end |
#thumb_type ⇒ Object
Returns the value of attribute thumb_type.
5 6 7 |
# File 'lib/media_rss/models/item.rb', line 5 def thumb_type @thumb_type end |
#title ⇒ Object
Returns the value of attribute title.
5 6 7 |
# File 'lib/media_rss/models/item.rb', line 5 def title @title end |