Class: Crags::Item

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(elem) ⇒ Item

Returns a new instance of Item.



5
6
7
8
9
# File 'lib/crags/item.rb', line 5

def initialize(elem)
  @title = elem.title
  @url = elem.url
  @date = elem.date
end

Instance Attribute Details

#dateObject (readonly)

Returns the value of attribute date.



3
4
5
# File 'lib/crags/item.rb', line 3

def date
  @date
end

#titleObject (readonly)

Returns the value of attribute title.



3
4
5
# File 'lib/crags/item.rb', line 3

def title
  @title
end

#urlObject (readonly)

Returns the value of attribute url.



3
4
5
# File 'lib/crags/item.rb', line 3

def url
  @url
end