Module: JsFlasher::Configuration
- Included in:
- JsFlasher, JsFlasherInitable
- Defined in:
- lib/js_flasher/configuration.rb
Constant Summary collapse
- VALID_OPTIONS =
[ :template_sources, :supported_extensions, :target_directory, :js_namespace, :extensions_in_keys ]
- DEFAULT_TEMPLATE_SOURCES =
{:Templates => 'app/assets/templates'}
- DEFAULT_SUPPORTED_EXENSIONS =
['.tpl.html']
- DEFAULT_TARGET_DIRECTORY =
'app/assets/javascripts/templates'
- DEFAULT_JS_NAMESPACE =
'JSF'
- DEFAULT_EXTENSIONS_IN_KEYS =
false
Class Method Summary collapse
-
.extended(base) ⇒ Object
When this module is extended, set all configuration options to their default values.
Instance Method Summary collapse
-
#configure {|_self| ... } ⇒ Object
Convenience method to allow configuration options to be set in a block.
-
#reset ⇒ Object
assign our defaults.
Class Method Details
.extended(base) ⇒ Object
When this module is extended, set all configuration options to their default values
26 27 28 |
# File 'lib/js_flasher/configuration.rb', line 26 def self.extended(base) base.reset end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
Convenience method to allow configuration options to be set in a block
31 32 33 |
# File 'lib/js_flasher/configuration.rb', line 31 def configure yield self end |
#reset ⇒ Object
assign our defaults
36 37 38 39 40 41 42 |
# File 'lib/js_flasher/configuration.rb', line 36 def reset self.template_sources = DEFAULT_TEMPLATE_SOURCES self.supported_extensions = DEFAULT_SUPPORTED_EXENSIONS self.target_directory = DEFAULT_TARGET_DIRECTORY self.js_namespace = DEFAULT_JS_NAMESPACE self.extensions_in_keys = DEFAULT_EXTENSIONS_IN_KEYS end |