Class: RailsHotreload::Checker
- Inherits:
-
Object
- Object
- RailsHotreload::Checker
- Defined in:
- lib/rails_hotreload.rb
Instance Attribute Summary collapse
-
#paths ⇒ Object
readonly
Returns the value of attribute paths.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(paths) ⇒ Checker
constructor
A new instance of Checker.
Constructor Details
#initialize(paths) ⇒ Checker
Returns a new instance of Checker.
13 14 15 |
# File 'lib/rails_hotreload.rb', line 13 def initialize(paths) @paths = paths end |
Instance Attribute Details
#paths ⇒ Object (readonly)
Returns the value of attribute paths.
11 12 13 |
# File 'lib/rails_hotreload.rb', line 11 def paths @paths end |
Instance Method Details
#call ⇒ Object
17 18 19 20 21 22 |
# File 'lib/rails_hotreload.rb', line 17 def call puts "Listening for changes in #{paths}" listener = Listen.to(*paths, {}) { stream_reload } listener.start sleep end |