Class: Bookmark

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

Overview

clean bookmark title, set attrs

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(f, t, u, id) ⇒ Bookmark

Returns a new instance of Bookmark.



136
137
138
139
140
141
# File 'lib/bookmarks.rb', line 136

def initialize(f, t, u, id)
  @title = t.gsub(/[:'"+]/, ' ').downcase
  @folder = f
  @url = u
  @id = id
end

Instance Attribute Details

#folderObject (readonly)

Returns the value of attribute folder.



135
136
137
# File 'lib/bookmarks.rb', line 135

def folder
  @folder
end

#idObject (readonly)

Returns the value of attribute id.



135
136
137
# File 'lib/bookmarks.rb', line 135

def id
  @id
end

#titleObject (readonly)

Returns the value of attribute title.



135
136
137
# File 'lib/bookmarks.rb', line 135

def title
  @title
end

#urlObject (readonly)

Returns the value of attribute url.



135
136
137
# File 'lib/bookmarks.rb', line 135

def url
  @url
end