Module: Stache::Config

Included in:
Stache
Defined in:
lib/stache/config.rb

Overview

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')

end

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#shared_pathObject

Returns the value of attribute shared_path.



12
13
14
# File 'lib/stache/config.rb', line 12

def shared_path
  @shared_path
end

#template_base_pathObject

Returns the value of attribute template_base_path.



12
13
14
# File 'lib/stache/config.rb', line 12

def template_base_path
  @template_base_path
end

#template_extensionObject

Returns the value of attribute template_extension.



12
13
14
# File 'lib/stache/config.rb', line 12

def template_extension
  @template_extension
end

Instance Method Details

#configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



14
15
16
# File 'lib/stache/config.rb', line 14

def configure
  yield self
end