class Twb::HTMLListCollapsible

Public Class Methods

new(hash) click to toggle source
# File lib/twb/util/htmllistcollapsible.rb, line 150
def initialize(hash)
  @htmldoc = @@doc
  @list    = HashToHTMLList.new(hash).list
  ul = @htmldoc.at_xpath('//ul')
  ul.replace(@list)
end

Public Instance Methods

html() click to toggle source
# File lib/twb/htmllistcollapsible.rb, line 148
def html
 " here's the @@doc"
end
installNavImageFile() click to toggle source
# File lib/twb/util/htmllistcollapsible.rb, line 176
def installNavImageFile
  navimage = File.dirname(__FILE__) + "/UpLeftArrowsNav.png"
  FileUtils.cp(navimage, Dir.pwd)
end
title=(str) click to toggle source
# File lib/twb/util/htmllistcollapsible.rb, line 157
def title=(str)
  title = @htmldoc.at_xpath('//div[@id="pgtitle"]')
  title.content = str if title 
end
write(name='collapsibleList.html') click to toggle source

Write the HTML to a file using the provided name.

# File lib/twb/util/htmllistcollapsible.rb, line 167
def write(name='collapsibleList.html')
  $f = File.open(name,'w')
  if $f
      $f.puts @htmldoc
      $f.close
  end
  installNavImageFile
end