Class: Lustr4XUL::XBLGenerationContext

Inherits:
GenerationContext show all
Defined in:
lib/lustr-xul/_common.rb

Instance Attribute Summary

Attributes inherited from GenerationContext

#name

Instance Method Summary collapse

Methods inherited from GenerationContext

#build_gadget_ref, #descend, #net_attrs

Constructor Details

#initialize(name) ⇒ XBLGenerationContext

Returns a new instance of XBLGenerationContext.



82
83
84
85
# File 'lib/lustr-xul/_common.rb', line 82

def initialize(name)
	super
	@script_needed=true
end

Instance Method Details

#to_sObject



87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/lustr-xul/_common.rb', line 87

def to_s
	wrapper=Builder::XmlMarkup.new

	wrapper.instruct! :xml, :version=>"1.0", :encoding=>"UTF-8"
	wrapper.bindings 'xmlns'=>'http://www.mozilla.org/xbl' do
		wrapper.binding 'id'=>name do
			wrapper.content do
				wrapper.children
				wrapper << self.target!
			end
		end
	end

	return(wrapper.target!)
end