Class: Pathtraq::Item

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Item

Returns a new instance of Item.



13
14
15
16
17
18
# File 'lib/pathtraq.rb', line 13

def initialize(data)
  @title = data.title
  @link = data.link
  @description = data.description
  @hits = data.pathtraq_hits.to_i
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



10
11
12
# File 'lib/pathtraq.rb', line 10

def description
  @description
end

#hitsObject (readonly)

Returns the value of attribute hits.



11
12
13
# File 'lib/pathtraq.rb', line 11

def hits
  @hits
end

Returns the value of attribute link.



9
10
11
# File 'lib/pathtraq.rb', line 9

def link
  @link
end

#titleObject (readonly)

Returns the value of attribute title.



8
9
10
# File 'lib/pathtraq.rb', line 8

def title
  @title
end