::Builder::BlankSlate
Every tag method in Markaby returns a Fragment. If any method gets called on the Fragment, the tag is removed from the Markaby stream and given back as a string. Usually the fragment is never used, though, and the stream stays intact.
For a more practical explanation, check out the README.
# File lib/markaby/builder.rb, line 292 292: def method_missing(*args, &block) 293: transform_stream unless transformed_stream? 294: @str.__send__(*args, &block) 295: end
# File lib/markaby/builder.rb, line 297 297: def transform_stream 298: @transformed_stream = true 299: 300: # We can't do @stream.slice!(@start, @length), 301: # as it would invalidate the @starts and @lengths of other Fragment instances. 302: @str = @stream[@start, @length].to_s 303: @stream[@start, @length] = [nil] * @length 304: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.