Class: StimulusReflex::Configuration
- Inherits:
-
Object
- Object
- StimulusReflex::Configuration
- Defined in:
- lib/stimulus_reflex/configuration.rb
Constant Summary collapse
- DEFAULT_LOGGING =
proc { "[#{session_id}] #{operation_counter.magenta} #{reflex_info.green} -> #{selector.cyan} via #{mode} Morph (#{operation.yellow})" }
Instance Attribute Summary collapse
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#logging ⇒ Object
Returns the value of attribute logging.
-
#middleware ⇒ Object
Returns the value of attribute middleware.
-
#morph_operation ⇒ Object
Returns the value of attribute morph_operation.
-
#on_failed_sanity_checks ⇒ Object
Returns the value of attribute on_failed_sanity_checks.
-
#on_missing_default_urls ⇒ Object
Returns the value of attribute on_missing_default_urls.
-
#parent_channel ⇒ Object
Returns the value of attribute parent_channel.
-
#precompile_assets ⇒ Object
Returns the value of attribute precompile_assets.
-
#replace_operation ⇒ Object
Returns the value of attribute replace_operation.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #on_new_version_available ⇒ Object
- #on_new_version_available=(_) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/stimulus_reflex/configuration.rb', line 29 def initialize @on_failed_sanity_checks = :exit @on_missing_default_urls = :warn @parent_channel = "ApplicationCable::Channel" @logging = DEFAULT_LOGGING @logger = Rails.logger @middleware = ActionDispatch::MiddlewareStack.new @morph_operation = :morph @replace_operation = :inner_html @precompile_assets = true end |
Instance Attribute Details
#logger ⇒ Object
Returns the value of attribute logger.
17 18 19 |
# File 'lib/stimulus_reflex/configuration.rb', line 17 def logger @logger end |
#logging ⇒ Object
Returns the value of attribute logging.
17 18 19 |
# File 'lib/stimulus_reflex/configuration.rb', line 17 def logging @logging end |
#middleware ⇒ Object
Returns the value of attribute middleware.
17 18 19 |
# File 'lib/stimulus_reflex/configuration.rb', line 17 def middleware @middleware end |
#morph_operation ⇒ Object
Returns the value of attribute morph_operation.
17 18 19 |
# File 'lib/stimulus_reflex/configuration.rb', line 17 def morph_operation @morph_operation end |
#on_failed_sanity_checks ⇒ Object
Returns the value of attribute on_failed_sanity_checks.
17 18 19 |
# File 'lib/stimulus_reflex/configuration.rb', line 17 def on_failed_sanity_checks @on_failed_sanity_checks end |
#on_missing_default_urls ⇒ Object
Returns the value of attribute on_missing_default_urls.
17 18 19 |
# File 'lib/stimulus_reflex/configuration.rb', line 17 def on_missing_default_urls @on_missing_default_urls end |
#parent_channel ⇒ Object
Returns the value of attribute parent_channel.
17 18 19 |
# File 'lib/stimulus_reflex/configuration.rb', line 17 def parent_channel @parent_channel end |
#precompile_assets ⇒ Object
Returns the value of attribute precompile_assets.
17 18 19 |
# File 'lib/stimulus_reflex/configuration.rb', line 17 def precompile_assets @precompile_assets end |
#replace_operation ⇒ Object
Returns the value of attribute replace_operation.
17 18 19 |
# File 'lib/stimulus_reflex/configuration.rb', line 17 def replace_operation @replace_operation end |
Instance Method Details
#on_new_version_available ⇒ Object
21 22 23 |
# File 'lib/stimulus_reflex/configuration.rb', line 21 def on_new_version_available warn "NOTICE: The `config.on_new_version_available` option has been removed from the StimulusReflex initializer. You can safely remove this option from your initializer." end |
#on_new_version_available=(_) ⇒ Object
25 26 27 |
# File 'lib/stimulus_reflex/configuration.rb', line 25 def on_new_version_available=(_) warn "NOTICE: The `config.on_new_version_available` option has been removed from the StimulusReflex initializer. You can safely remove this option from your initializer." end |