class Twb::DocDashboardWebVert
Attributes
url[R]
Public Class Methods
new()
click to toggle source
# File lib/twb/docdashboardwebvert.rb, line 59 def initialize @oneColWebPageDash = Nokogiri::XML::Document.parse <<-ONECOlWEBDASH <dashdoc> <dashboard name='Single Column Web Page Automatic'> <style></style> <zones> <zone h='100000' id='3' param='vert' type='layout-flow' w='100000' x='0' y='0'> <zone h='6221' id='1' type='title' w='100000' x='0' y='0'></zone> <zone h='93157' id='4' param='horz' type='layout-flow' w='100000' x='0' y='6221'> <zone forceUpdate='' h='93157' id='6' param='URL' type='web' w='99655' x='0' y='6221'></zone> </zone> </zone> </zones> </dashboard> <window auto-hidden='0' class='dashboard' maximized='1' name='Single Column Web Page Automatic'> <zones> <zone h='6221' id='1' name='' type='title' w='100000' x='0' y='0' /> <zone forceUpdate='' h='93157' id='5' name='' param='Web Page' type='web' w='50000' x='50000' y='6221' /> </zones> </window> </dashdoc> ONECOlWEBDASH # notes: # - adding a size element to the <dashboard element will change it from automatic, e.g. # # <dashboard name='One Column Web Page Laptop (800w 600h)'> # <style> # </style> # <size maxheight='600' maxwidth='800' minheight='600' minwidth='800' /> # # - the 'name' sttributes for the window and dashboard must match @type = 'columnar Web Page' @dashnode = @oneColWebPageDash.at_xpath('//dashboard') @winnode = @oneColWebPageDash.at_xpath('//window') end
Public Instance Methods
title=(title)
click to toggle source
# File lib/twb/docdashboardwebvert.rb, line 95 def title=(title) @title = title @dashnode['name'] = title @winnode['name'] = title end
url=(url)
click to toggle source
# File lib/twb/docdashboardwebvert.rb, line 101 def url=(url) dashwebzone = @dashnode.at_xpath('.//zone[@type="web"]') dashwebzone['param'] = url # unless dashwebzone.nil? winwebzone = @winnode.at_xpath('.//zone[@type="web"]') winwebzone['param'] = url # unless winwebzone.nil? end