Class: Feed2Mail::Item

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(entry) ⇒ Item

Returns a new instance of Item.



7
8
9
10
11
12
13
14
# File 'lib/feed2mail/item.rb', line 7

def initialize(entry)
  @uri          = entry[:guid] || entry[:link]

  coder = HTMLEntities.new

  @title        = coder.decode entry[:title]
  @description  = coder.decode entry[:description]
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



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

def description
  @description
end

#titleObject (readonly)

Returns the value of attribute title.



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

def title
  @title
end

#uriObject (readonly)

Returns the value of attribute uri.



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

def uri
  @uri
end