Sha256: 1cb46e30bb339b677979d737e98b37867f563996d5370214e83910eae1ba70a5
Contents?: true
Size: 740 Bytes
Versions: 3
Compression:
Stored size: 740 Bytes
Contents
module Middleman module Renderers @@render_method_for_template_types = {} def self.register(method_name, template_type) @@render_method_for_template_types[template_type.to_s] = method_name end def self.get_method(template_path) template_type = Tilt[template_path].to_s @@render_method_for_template_types[template_type] end end end # Types built into Sinatra Middleman::Renderers.register(:less, Tilt::LessTemplate) Middleman::Renderers.register(:haml, Tilt::HamlTemplate) Middleman::Renderers.register(:builder, Tilt::BuilderTemplate) Middleman::Renderers.register(:erb, Tilt::ERBTemplate) %w(haml sass coffee).each { |renderer| require "middleman/renderers/#{renderer}" }
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
middleman-0.99.1.pre | lib/middleman/renderers.rb |
middleman-0.99.0.pre | lib/middleman/renderers.rb |
middleman-0.9.0.pre | lib/middleman/renderers.rb |