lib/stache/config.rb in stache-1.0.3 vs lib/stache/config.rb in stache-1.1.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
+ attr_accessor :template_base_path, :shared_path, :wrapper_module_name, :include_path_in_id, :template_cache
def configure
yield self
end
@@ -29,9 +29,25 @@
@shared_path ||= ::Rails.root.join('app', 'templates', 'shared')
end
def wrapper_module_name
@wrapper_module_name ||= nil
+ end
+
+ def include_path_in_id
+ @include_path_in_id ||= false
+ end
+
+ def include_path_in_id= boolean
+ @include_path_in_id = boolean
+ end
+
+ def template_cache
+ @template_cache ||= ActiveSupport::Cache::NullStore.new
+ end
+
+ def template_cache= cache
+ @template_cache = cache
end
def use template_engine
require "stache/#{template_engine}"
end
\ No newline at end of file