Class: FreeScrape::ItemLink
- Inherits:
-
Object
- Object
- FreeScrape::ItemLink
- Defined in:
- lib/free_scrape/item_link.rb
Instance Attribute Summary collapse
-
#title ⇒ Object
readonly
Title of the item.
-
#url ⇒ Object
readonly
URL of the item.
Instance Method Summary collapse
-
#initialize(title, url) ⇒ ItemLink
constructor
Creates a new ItemLink with the specified title and url.
-
#to_s ⇒ Object
Returns the title of the item-link in
String
form.
Constructor Details
#initialize(title, url) ⇒ ItemLink
Creates a new ItemLink with the specified title and url.
13 14 15 16 |
# File 'lib/free_scrape/item_link.rb', line 13 def initialize(title,url) @title = title @url = url end |
Instance Attribute Details
#title ⇒ Object (readonly)
Title of the item
5 6 7 |
# File 'lib/free_scrape/item_link.rb', line 5 def title @title end |
#url ⇒ Object (readonly)
URL of the item
8 9 10 |
# File 'lib/free_scrape/item_link.rb', line 8 def url @url end |
Instance Method Details
#to_s ⇒ Object
Returns the title of the item-link in String
form.
21 22 23 |
# File 'lib/free_scrape/item_link.rb', line 21 def to_s @title.to_s end |