lib/glue/builder.rb in glue-0.29.0 vs lib/glue/builder.rb in glue-0.30.0

- old
+ new

@@ -30,19 +30,30 @@ end # Provide the target where the builder output will be # accomulated. The builder utilizes duck typing to make it - # compatible with anly target responding to <<. + # compatible with any target responding to <<. - def initialize(buffer = '', *modules) - @buffer = buffer - + def initialize(buffer = '', options = {}) + @buffer = buffer end + # Emit a text string. + + def text!(str) + @buffer << str + + return self + end + alias_method :print, :text! + alias_method :<<, :text! + + def to_s + @buffer.to_s + end + end end # * George Moschovitis <gm@navel.gr> - -__END__