Module: Mustache::Rails::Config

Defined in:
lib/generators/mustache/install/templates/lib/mustache_rails.rb

Overview

You can change these defaults in, say, a Rails initializer or environment.rb, e.g.:

Mustache::Rails::Config.template_base_path = Rails.root.join(‘app’, ‘templates’)

Class Method Summary collapse

Class Method Details

.shared_pathObject



56
57
58
# File 'lib/generators/mustache/install/templates/lib/mustache_rails.rb', line 56

def self.shared_path
  @shared_path ||= ::Rails.root.join('app', 'templates', 'shared')
end

.shared_path=(value) ⇒ Object



60
61
62
# File 'lib/generators/mustache/install/templates/lib/mustache_rails.rb', line 60

def self.shared_path=(value)
  @shared_path = value
end

.template_base_pathObject



40
41
42
# File 'lib/generators/mustache/install/templates/lib/mustache_rails.rb', line 40

def self.template_base_path
  @template_base_path ||= ::Rails.root.join('app', 'templates')
end

.template_base_path=(value) ⇒ Object



44
45
46
# File 'lib/generators/mustache/install/templates/lib/mustache_rails.rb', line 44

def self.template_base_path=(value)
  @template_base_path = value
end

.template_extensionObject



48
49
50
# File 'lib/generators/mustache/install/templates/lib/mustache_rails.rb', line 48

def self.template_extension
  @template_extension ||= 'html.mustache'
end

.template_extension=(value) ⇒ Object



52
53
54
# File 'lib/generators/mustache/install/templates/lib/mustache_rails.rb', line 52

def self.template_extension=(value)
  @template_extension = value
end