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, source = nil) ⇒ Bookmark

Returns a new instance of Bookmark.



428
429
430
431
432
433
434
# File 'lib/bookmarks.rb', line 428

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

Instance Attribute Details

#folderObject (readonly)

Returns the value of attribute folder.



427
428
429
# File 'lib/bookmarks.rb', line 427

def folder
  @folder
end

#idObject (readonly)

Returns the value of attribute id.



427
428
429
# File 'lib/bookmarks.rb', line 427

def id
  @id
end

#sourceObject (readonly)

Returns the value of attribute source.



427
428
429
# File 'lib/bookmarks.rb', line 427

def source
  @source
end

#titleObject (readonly)

Returns the value of attribute title.



427
428
429
# File 'lib/bookmarks.rb', line 427

def title
  @title
end

#urlObject (readonly)

Returns the value of attribute url.



427
428
429
# File 'lib/bookmarks.rb', line 427

def url
  @url
end