Class: Bookmark
- Inherits:
-
Object
- Object
- Bookmark
- Defined in:
- lib/bookmarks.rb
Overview
clean bookmark title, set attrs
Instance Attribute Summary collapse
-
#folder ⇒ Object
readonly
Returns the value of attribute folder.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(f, t, u, id) ⇒ Bookmark
constructor
A new instance of Bookmark.
Constructor Details
#initialize(f, t, u, id) ⇒ Bookmark
Returns a new instance of Bookmark.
139 140 141 142 143 144 |
# File 'lib/bookmarks.rb', line 139 def initialize(f, t, u, id) @title = t.gsub(/[:'"+]/, ' ').downcase @folder = f @url = u @id = id end |
Instance Attribute Details
#folder ⇒ Object (readonly)
Returns the value of attribute folder.
138 139 140 |
# File 'lib/bookmarks.rb', line 138 def folder @folder end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
138 139 140 |
# File 'lib/bookmarks.rb', line 138 def id @id end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
138 139 140 |
# File 'lib/bookmarks.rb', line 138 def title @title end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
138 139 140 |
# File 'lib/bookmarks.rb', line 138 def url @url end |