# File lib/markaby/builder.rb, line 38
38:     def initialize(assigns = {}, helpers = nil, &block)
39:       @stream = []
40:       @assigns = assigns
41:       @builder = ::Builder::XmlMarkup.new(:indent => 2, :target => @stream)
42:       @output_helpers = true
43: 
44:       if helpers.nil?
45:         @helpers = nil
46:       else
47:         @helpers = helpers.dup
48:         for iv in helpers.instance_variables
49:           instance_variable_set(iv, helpers.instance_variable_get(iv))
50:         end
51:       end
52: 
53:       unless assigns.nil? || assigns.empty?
54:         for iv, val in assigns
55:           instance_variable_set("@#{iv}", val)
56:           unless @helpers.nil?
57:             @helpers.instance_variable_set("@#{iv}", val)
58:           end
59:         end
60:       end
61: 
62:       if block
63:         r = instance_eval &block
64:         text(r) if to_s.empty?
65:       end
66:     end