Module: HandlebarsAssets::Config
Overview
Change config options in an initializer:
HandlebarsAssets::Config.path_prefix = ‘app/templates’
Instance Attribute Summary collapse
- #compiler ⇒ Object
- #compiler_path ⇒ Object
-
#ember ⇒ Object
writeonly
Sets the attribute ember.
- #haml_options ⇒ Object
- #known_helpers ⇒ Object
- #known_helpers_only ⇒ Object
- #options ⇒ Object
- #patch_files ⇒ Object
- #patch_path ⇒ Object
- #path_prefix ⇒ Object
- #slim_options ⇒ Object
- #template_namespace ⇒ Object
Instance Method Summary collapse
Instance Attribute Details
#compiler ⇒ Object
12 13 14 |
# File 'lib/handlebars_assets/config.rb', line 12 def compiler @compiler || 'handlebars.js' end |
#compiler_path ⇒ Object
16 17 18 |
# File 'lib/handlebars_assets/config.rb', line 16 def compiler_path @compiler_path || .path end |
#ember=(value) ⇒ Object (writeonly)
Sets the attribute ember
8 9 10 |
# File 'lib/handlebars_assets/config.rb', line 8 def ember=(value) @ember = value end |
#haml_options ⇒ Object
28 29 30 |
# File 'lib/handlebars_assets/config.rb', line 28 def || {} end |
#known_helpers ⇒ Object
32 33 34 |
# File 'lib/handlebars_assets/config.rb', line 32 def known_helpers @known_helpers || [] end |
#known_helpers_only ⇒ Object
36 37 38 |
# File 'lib/handlebars_assets/config.rb', line 36 def known_helpers_only @known_helpers_only || false end |
#options ⇒ Object
40 41 42 |
# File 'lib/handlebars_assets/config.rb', line 40 def ||= end |
#patch_files ⇒ Object
44 45 46 |
# File 'lib/handlebars_assets/config.rb', line 44 def patch_files Array(@patch_files) end |
#patch_path ⇒ Object
48 49 50 |
# File 'lib/handlebars_assets/config.rb', line 48 def patch_path @patch_path ||= compiler_path end |
#path_prefix ⇒ Object
52 53 54 |
# File 'lib/handlebars_assets/config.rb', line 52 def path_prefix @path_prefix || 'templates' end |
#slim_options ⇒ Object
60 61 62 |
# File 'lib/handlebars_assets/config.rb', line 60 def || {} end |
#template_namespace ⇒ Object
64 65 66 |
# File 'lib/handlebars_assets/config.rb', line 64 def template_namespace @template_namespace || 'HandlebarsTemplates' end |
Instance Method Details
#ember? ⇒ Boolean
20 21 22 |
# File 'lib/handlebars_assets/config.rb', line 20 def ember? @ember end |
#haml_available? ⇒ Boolean
24 25 26 |
# File 'lib/handlebars_assets/config.rb', line 24 def haml_available? defined? ::Haml::Engine end |
#slim_available? ⇒ Boolean
56 57 58 |
# File 'lib/handlebars_assets/config.rb', line 56 def slim_available? defined? ::Slim::Engine end |