lib/bookmarks/document.rb
# Public: Build a document, ie build a file of bookmarks.
#
# block - A block that enumerate all NetscapeBookmark to put
#         into the document.
#
# Examples
#
#   # ary is an array of NetscapeBookmark.
#   document.build do
#     ary.each {|e| e }
#   end
#
# Returns the String document.
Build a document, ie build a file of bookmarks.
block - A block that enumerate all NetscapeBookmark to put
into the document.

Examples

ary is an array of NetscapeBookmark.

Returns the String document.
Build a document ie build a file of bookmarks . block - A block that enumerate all NetscapeBookmark to put into the document . Examples ary is an array of NetscapeBookmark . Returns the String document .
def build &block
      @document += FIRST_PART
      block.call.each do |n|
        @document += n.to_s + "\n"
        @total += 1
      end
      @document += LAST_PART
    end
def build & block @document += FIRST_PART block . call . each do | n | @document += n . to_s + "\n" @total += 1 end @document += LAST_PART end
Public: Build a document, ie build a file of bookmarks.
Public : Build a document ie build a file of bookmarks .
block