::ActionView::TemplateHandler
# File lib/markaby/rails/current.rb, line 8 8: def compile(template, local_assigns={}) 9: __template_handler = Markaby::Rails::TemplateHandler.new __template_handler.view = self __template_handler.render(lambda { #{template.source} }, local_assigns) 10: end
# File lib/markaby/rails/current.rb, line 18 18: def render(template, local_assigns = (template.respond_to?(:locals) ? template.locals : {})) 19: builder = RailsBuilder.new(instance_variables.merge(local_assigns), @view) 20: @view.output_buffer = builder 21: 22: template.is_a?(Proc) ? 23: builder.instance_eval(&template) : 24: builder.instance_eval(template.source) 25: 26: builder.to_s 27: end
# File lib/markaby/rails/current.rb, line 37 37: def instance_variable_hash(object) 38: returning Hash.new do |hash| 39: object.instance_variables.each do |var_name| 40: hash[var_name.gsub("@", "")] = object.instance_variable_get(var_name) 41: end 42: end 43: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.