Class: MediaRss::Item

Inherits:
Object
  • Object
show all
Defined in:
lib/media_rss/models/item.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#contentObject

Returns the value of attribute content.



5
6
7
# File 'lib/media_rss/models/item.rb', line 5

def content
  @content
end

#content_typeObject

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

#descriptionObject

Returns the value of attribute description.



5
6
7
# File 'lib/media_rss/models/item.rb', line 5

def description
  @description
end

#guidObject

Returns the value of attribute guid.



5
6
7
# File 'lib/media_rss/models/item.rb', line 5

def guid
  @guid
end

Returns the value of attribute link.



5
6
7
# File 'lib/media_rss/models/item.rb', line 5

def link
  @link
end

#thumbObject

Returns the value of attribute thumb.



5
6
7
# File 'lib/media_rss/models/item.rb', line 5

def thumb
  @thumb
end

#thumb_typeObject

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

#titleObject

Returns the value of attribute title.



5
6
7
# File 'lib/media_rss/models/item.rb', line 5

def title
  @title
end