class BookmarkMachine::NetscapeFormatter

Formatter for the Netscape Bookmark File format. Amusingly, the best documentation for the format comes from Microsoft.

https://msdn.microsoft.com/en-us/library/aa753582(v=vs.85).aspx

We live in interesting times.

Attributes

bookmarks[R]

Public Class Methods

new(bookmarks) click to toggle source
# File lib/bookmark_machine/netscape_formatter.rb, line 13
def initialize(bookmarks)
  @bookmarks = bookmarks
end

Public Instance Methods

to_html() click to toggle source

Returns an Array of Bookmark objects.

# File lib/bookmark_machine/netscape_formatter.rb, line 18
def to_html
  writer = Writer.new(StringIO.new)
  
  bookmarks.each{|b| writer << b }
  writer.done
  
  writer.io.string
end
Also aliased as: to_s
to_s()
Alias for: to_html