Class: Bookmark
- Inherits:
-
Object
- Object
- Bookmark
- Defined in:
- lib/bookmarks.rb
Overview
just hold data
Instance Method Summary collapse
- #folder ⇒ Object
- #id ⇒ Object
-
#initialize(f, t, u, id) ⇒ Bookmark
constructor
clean bookmark title, set attrs.
- #title ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(f, t, u, id) ⇒ Bookmark
clean bookmark title, set attrs
120 121 122 123 124 125 |
# File 'lib/bookmarks.rb', line 120 def initialize(f, t, u, id) @title = t.gsub(/[: ,'"+\-]/, '_').downcase @folder = f @url = u @id = id end |
Instance Method Details
#folder ⇒ Object
127 128 129 |
# File 'lib/bookmarks.rb', line 127 def folder @folder end |
#id ⇒ Object
135 136 137 |
# File 'lib/bookmarks.rb', line 135 def id @id end |
#title ⇒ Object
131 132 133 |
# File 'lib/bookmarks.rb', line 131 def title @title end |
#url ⇒ Object
139 140 141 |
# File 'lib/bookmarks.rb', line 139 def url @url end |