Class: Hotwire::Spark::Change
- Inherits:
-
Object
- Object
- Hotwire::Spark::Change
- Defined in:
- lib/hotwire/spark/change.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#changed_path ⇒ Object
readonly
Returns the value of attribute changed_path.
-
#extensions ⇒ Object
readonly
Returns the value of attribute extensions.
-
#monitored_paths ⇒ Object
readonly
Returns the value of attribute monitored_paths.
Instance Method Summary collapse
- #broadcast ⇒ Object
-
#initialize(monitored_paths, extensions, changed_path, action) ⇒ Change
constructor
A new instance of Change.
Constructor Details
#initialize(monitored_paths, extensions, changed_path, action) ⇒ Change
Returns a new instance of Change.
4 5 6 7 8 9 |
# File 'lib/hotwire/spark/change.rb', line 4 def initialize(monitored_paths, extensions, changed_path, action) @monitored_paths = monitored_paths @extensions = extensions @changed_path = changed_path @action = action end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
2 3 4 |
# File 'lib/hotwire/spark/change.rb', line 2 def action @action end |
#changed_path ⇒ Object (readonly)
Returns the value of attribute changed_path.
2 3 4 |
# File 'lib/hotwire/spark/change.rb', line 2 def changed_path @changed_path end |
#extensions ⇒ Object (readonly)
Returns the value of attribute extensions.
2 3 4 |
# File 'lib/hotwire/spark/change.rb', line 2 def extensions @extensions end |
#monitored_paths ⇒ Object (readonly)
Returns the value of attribute monitored_paths.
2 3 4 |
# File 'lib/hotwire/spark/change.rb', line 2 def monitored_paths @monitored_paths end |
Instance Method Details
#broadcast ⇒ Object
11 12 13 |
# File 'lib/hotwire/spark/change.rb', line 11 def broadcast broadcast_reload_action if should_broadcast? end |