Sha256: 6b921547b3a61fb3e50f9420f040570192d7c238a3af4f61ec2363b94edba89a

Contents?: true

Size: 310 Bytes

Versions: 11

Compression:

Stored size: 310 Bytes

Contents

module Workbench

	class Renderer

		def initialize file, options = {}
			@file = file
			@options = {
				:escape_attrs => true,
				:attr_wrapper => '"',
				:format => :html4
			}.merge(options)

		end

		def render
			engine = Haml::Engine.new(File.read(@file), @options)
			engine.render
		end

	end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
work-bench-1.0.6 lib/work_bench/renderer.rb
work-bench-1.0.5 lib/work_bench/renderer.rb
work-bench-1.0.4 lib/work_bench/renderer.rb
work-bench-1.0.3 lib/work_bench/renderer.rb
work-bench-1.0.2 lib/work_bench/renderer.rb
work-bench-1.0.1 lib/work_bench/renderer.rb
work-bench-1.0.0 lib/work_bench/renderer.rb
work-bench-0.3.5 lib/work_bench/renderer.rb
work-bench-0.3.4 lib/work_bench/renderer.rb
work-bench-0.3.3 lib/work_bench/renderer.rb
work-bench-0.3.0 lib/workbench/renderer.rb