Class: Space::Shell::Watch
- Inherits:
-
Object
- Object
- Space::Shell::Watch
- Defined in:
- lib/space/shell/watch.rb
Constant Summary collapse
- LATENCY =
0
- NO_DEFER =
FALSE
Instance Attribute Summary collapse
-
#callback ⇒ Object
readonly
Returns the value of attribute callback.
-
#mutex ⇒ Object
readonly
Returns the value of attribute mutex.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(path, &block) ⇒ Watch
constructor
A new instance of Watch.
- #run ⇒ Object
Constructor Details
#initialize(path, &block) ⇒ Watch
Returns a new instance of Watch.
11 12 13 14 15 16 |
# File 'lib/space/shell/watch.rb', line 11 def initialize(path, &block) @path = File.(path) @callback = block @mutex = Mutex.new self end |
Instance Attribute Details
#callback ⇒ Object (readonly)
Returns the value of attribute callback.
9 10 11 |
# File 'lib/space/shell/watch.rb', line 9 def callback @callback end |
#mutex ⇒ Object (readonly)
Returns the value of attribute mutex.
9 10 11 |
# File 'lib/space/shell/watch.rb', line 9 def mutex @mutex end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
9 10 11 |
# File 'lib/space/shell/watch.rb', line 9 def path @path end |