Sha256: 99cdc17f3dd422b5788efabc30f65a7d90b811165d809724217984d58db513f9
Contents?: true
Size: 399 Bytes
Versions: 3
Compression:
Stored size: 399 Bytes
Contents
module RailsTemplater class TemplateEngine DEFAULT = :haml SUPPORTED_TYPES = [:haml, :slim, :erb] def type @type || DEFAULT end def type=(value) raise NotSupportedError unless SUPPORTED_TYPES.include?(value) @type ||= value end SUPPORTED_TYPES.each do |type| define_method "#{type}?" do self.type == type end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rails_templater-0.2.1 | lib/rails_templater/template_engine.rb |
rails_templater-0.2.0 | lib/rails_templater/template_engine.rb |
rails_templater-0.1.2 | lib/rails_templater/template_engine.rb |