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
-
#multiple_frameworks ⇒ Object
writeonly
Sets the attribute multiple_frameworks.
- #options ⇒ Object
- #patch_files ⇒ Object
- #patch_path ⇒ Object
- #path_prefix ⇒ Object
- #slim_options ⇒ Object
- #template_namespace ⇒ Object
Instance Method Summary collapse
- #configure {|_self| ... } ⇒ Object
- #ember? ⇒ Boolean
- #haml_available? ⇒ Boolean
- #multiple_frameworks? ⇒ Boolean
- #slim_available? ⇒ Boolean
Instance Attribute Details
#compiler ⇒ Object
16 17 18 |
# File 'lib/handlebars_assets/config.rb', line 16 def compiler @compiler || 'handlebars.js' end |
#compiler_path ⇒ Object
20 21 22 |
# File 'lib/handlebars_assets/config.rb', line 20 def compiler_path @compiler_path || HandlebarsAssets.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
36 37 38 |
# File 'lib/handlebars_assets/config.rb', line 36 def @haml_options || {} end |
#known_helpers ⇒ Object
40 41 42 |
# File 'lib/handlebars_assets/config.rb', line 40 def known_helpers @known_helpers || [] end |
#known_helpers_only ⇒ Object
44 45 46 |
# File 'lib/handlebars_assets/config.rb', line 44 def known_helpers_only @known_helpers_only || false end |
#multiple_frameworks=(value) ⇒ Object (writeonly)
Sets the attribute multiple_frameworks
8 9 10 |
# File 'lib/handlebars_assets/config.rb', line 8 def multiple_frameworks=(value) @multiple_frameworks = value end |
#options ⇒ Object
48 49 50 |
# File 'lib/handlebars_assets/config.rb', line 48 def @options ||= end |
#patch_files ⇒ Object
52 53 54 |
# File 'lib/handlebars_assets/config.rb', line 52 def patch_files Array(@patch_files) end |
#patch_path ⇒ Object
56 57 58 |
# File 'lib/handlebars_assets/config.rb', line 56 def patch_path @patch_path ||= compiler_path end |
#path_prefix ⇒ Object
60 61 62 |
# File 'lib/handlebars_assets/config.rb', line 60 def path_prefix @path_prefix || 'templates' end |
#slim_options ⇒ Object
68 69 70 |
# File 'lib/handlebars_assets/config.rb', line 68 def @slim_options || {} end |
#template_namespace ⇒ Object
72 73 74 |
# File 'lib/handlebars_assets/config.rb', line 72 def template_namespace @template_namespace || 'HandlebarsTemplates' end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
12 13 14 |
# File 'lib/handlebars_assets/config.rb', line 12 def configure yield self end |
#ember? ⇒ Boolean
24 25 26 |
# File 'lib/handlebars_assets/config.rb', line 24 def ember? @ember end |
#haml_available? ⇒ Boolean
32 33 34 |
# File 'lib/handlebars_assets/config.rb', line 32 def haml_available? defined? ::Haml::Engine end |
#multiple_frameworks? ⇒ Boolean
28 29 30 |
# File 'lib/handlebars_assets/config.rb', line 28 def multiple_frameworks? @multiple_frameworks end |
#slim_available? ⇒ Boolean
64 65 66 |
# File 'lib/handlebars_assets/config.rb', line 64 def slim_available? defined? ::Slim::Engine end |