Class: Bookmark
- Inherits:
-
Object
- Object
- Bookmark
- Defined in:
- lib/bookmarks.rb
Overview
clean bookmark title, set attrs
Instance Method Summary collapse
- #folder ⇒ Object
- #id ⇒ Object
-
#initialize(f, t, u, id) ⇒ Bookmark
constructor
A new instance of Bookmark.
- #title ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(f, t, u, id) ⇒ Bookmark
Returns a new instance of Bookmark.
129 130 131 132 133 134 |
# File 'lib/bookmarks.rb', line 129 def initialize(f, t, u, id) @title = t.gsub(/[: ,'"+\-]/, '_').downcase @folder = f @url = u @id = id end |
Instance Method Details
#folder ⇒ Object
136 |
# File 'lib/bookmarks.rb', line 136 def folder() @folder end |
#id ⇒ Object
139 |
# File 'lib/bookmarks.rb', line 139 def id() @id end |
#title ⇒ Object
137 |
# File 'lib/bookmarks.rb', line 137 def title() @title end |
#url ⇒ Object
138 |
# File 'lib/bookmarks.rb', line 138 def url() @url end |