Sha256: 058a6330ff53a58675ddb2ec59bcd6769bfc8adfe71c1cb71d59ef27634b8826
Contents?: true
Size: 600 Bytes
Versions: 1
Compression:
Stored size: 600 Bytes
Contents
module KisoThemes module Generators module HandlerSupport extend ActiveSupport::Concern included do class_option :template_engine end protected def supported_handlers %w(erb haml slim) end def handler handler = options[:template_engine].to_s.gsub('erubis', 'erb') handler = 'erb' unless supported_handlers.include?(handler) # Default to ERB if handler is unsupported handler end def unsupported_handlers supported_handlers - [ handler ] end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kiso_themes-1.0.2 | lib/generators/kiso_themes/handler_support.rb |