Module: HandlebarsAssets::Config

Extended by:
Config
Included in:
Config
Defined in:
lib/handlebars_assets/config.rb

Overview

Change config options in an initializer:

HandlebarsAssets::Config.path_prefix = ‘app/templates’

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#compilerObject



10
11
12
# File 'lib/handlebars_assets/config.rb', line 10

def compiler
  @compiler || 'handlebars.js'
end

#compiler_pathObject



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

def compiler_path
  @compiler_path || HandlebarsAssets.path
end

#ember=(value) ⇒ Object (writeonly)

Sets the attribute ember

Parameters:

  • value

    the value to set the attribute ember to.



8
9
10
# File 'lib/handlebars_assets/config.rb', line 8

def ember=(value)
  @ember = value
end

#haml_optionsObject



26
27
28
# File 'lib/handlebars_assets/config.rb', line 26

def haml_options
  @haml_options || {}
end

#known_helpersObject



30
31
32
# File 'lib/handlebars_assets/config.rb', line 30

def known_helpers
  @known_helpers || []
end

#known_helpers_onlyObject



34
35
36
# File 'lib/handlebars_assets/config.rb', line 34

def known_helpers_only
  @known_helpers_only || false
end

#optionsObject



38
39
40
# File 'lib/handlebars_assets/config.rb', line 38

def options
  @options ||= generate_options
end

#path_prefixObject



42
43
44
# File 'lib/handlebars_assets/config.rb', line 42

def path_prefix
  @path_prefix || 'templates'
end

#template_namespaceObject



46
47
48
# File 'lib/handlebars_assets/config.rb', line 46

def template_namespace
  @template_namespace || 'HandlebarsTemplates'
end

Instance Method Details

#ember?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/handlebars_assets/config.rb', line 18

def ember?
  @ember
end

#haml_available?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/handlebars_assets/config.rb', line 22

def haml_available?
  defined? ::Haml::Engine
end