class Haml::CLI
def generate_code(file)
def generate_code(file) template = read_file(file) if options[:actionview] require 'action_view' require 'action_view/base' require 'haml/rails_template' handler = Haml::RailsTemplate.new template = ActionView::Template.new(template, 'inline template', handler, { locals: [] }) code = handler.call(template) <<-end_src def _inline_template___2144273726781623612_70327218547300(local_assigns, output_buffer) _old_virtual_path, @virtual_path = @virtual_path, nil;_old_output_buffer = @output_buffer;;#{code} ensure @virtual_path, @output_buffer = _old_virtual_path, _old_output_buffer end end_src else Haml::Engine.new(engine_options).call(template) end end