lib/stache/config.rb in stache-1.1.1 vs lib/stache/config.rb in stache-1.2.0
- old
+ new
@@ -9,11 +9,11 @@
# config.template_base_path = Rails.root.join('app', 'views', 'shared')
#
# use :mustache # or :handlebars
# end
module Config
- attr_accessor :template_base_path, :shared_path, :wrapper_module_name, :include_path_in_id, :template_cache
+ attr_accessor :template_base_path, :template_extension, :template_base_class, :shared_path, :wrapper_module_name, :include_path_in_id, :template_cache
def configure
yield self
end
@@ -21,9 +21,25 @@
@template_base_path ||= ::Rails.root.join('app', 'templates')
end
def template_base_path= path
@template_base_path = Pathname.new(path)
+ end
+
+ def template_extension
+ @template_extension ||= 'html.mustache'
+ end
+
+ def template_extension= value
+ @template_extension = value
+ end
+
+ def template_base_class
+ @template_base_class ||= '::Stache::Mustache::View'
+ end
+
+ def template_base_class= value
+ @template_base_class = value
end
def shared_path
@shared_path ||= ::Rails.root.join('app', 'templates', 'shared')
end
\ No newline at end of file