module Stache::Config
Change these defaults in, say, an initializer.
Stache.template_base_path = Rails.root.join('app', 'templates')
Or with the block syntax:
Stache.configure do |config|
config.template_base_path = Rails.root.join('app', 'views', 'shared') use :mustache # or :handlebars
end
Attributes
include_path_in_id[RW]
template_base_class[RW]
template_base_path[RW]
template_cache[RW]
template_extension[RW]
wrapper_module_name[RW]
Public Instance Methods
configure() { |self| ... }
click to toggle source
# File lib/stache/config.rb, line 16 def configure yield self end
include_path_in_id=(boolean)
click to toggle source
# File lib/stache/config.rb, line 56 def include_path_in_id= boolean @include_path_in_id = boolean end
template_base_class=(value)
click to toggle source
# File lib/stache/config.rb, line 40 def template_base_class= value @template_base_class = value end
template_base_path=(path)
click to toggle source
# File lib/stache/config.rb, line 24 def template_base_path= path @template_base_path = Pathname.new(path) end
template_cache=(cache)
click to toggle source
# File lib/stache/config.rb, line 64 def template_cache= cache @template_cache = cache end
template_extension=(value)
click to toggle source
# File lib/stache/config.rb, line 32 def template_extension= value @template_extension = value end
use(template_engine)
click to toggle source
# File lib/stache/config.rb, line 68 def use template_engine require "stache/#{template_engine}" end