Class: Bashly::Watch
- Inherits:
-
Object
- Object
- Bashly::Watch
- Defined in:
- lib/bashly/watch.rb
Overview
File system watcher - an ergonomic wrapper around the Watchly gem
Instance Attribute Summary collapse
-
#interval ⇒ Object
readonly
Returns the value of attribute interval.
-
#targets ⇒ Object
readonly
Returns the value of attribute targets.
Instance Method Summary collapse
-
#initialize(*targets, interval: nil) ⇒ Watch
constructor
A new instance of Watch.
- #on_change ⇒ Object
Constructor Details
#initialize(*targets, interval: nil) ⇒ Watch
Returns a new instance of Watch.
8 9 10 11 |
# File 'lib/bashly/watch.rb', line 8 def initialize(*targets, interval: nil) @targets = targets.empty? ? ['.'] : targets @interval = interval || default_interval end |
Instance Attribute Details
#interval ⇒ Object (readonly)
Returns the value of attribute interval.
6 7 8 |
# File 'lib/bashly/watch.rb', line 6 def interval @interval end |
#targets ⇒ Object (readonly)
Returns the value of attribute targets.
6 7 8 |
# File 'lib/bashly/watch.rb', line 6 def targets @targets end |