Class: Build::Files::Handle
- Inherits:
-
Object
- Object
- Build::Files::Handle
- Defined in:
- lib/build/files/state.rb
Instance Attribute Summary collapse
-
#monitor ⇒ Object
readonly
Returns the value of attribute monitor.
Instance Method Summary collapse
- #changed! ⇒ Object
- #commit! ⇒ Object
- #directories ⇒ Object
-
#initialize(monitor, files, &block) ⇒ Handle
constructor
A new instance of Handle.
- #remove! ⇒ Object
Constructor Details
Instance Attribute Details
#monitor ⇒ Object (readonly)
Returns the value of attribute monitor.
219 220 221 |
# File 'lib/build/files/state.rb', line 219 def monitor @monitor end |
Instance Method Details
#changed! ⇒ Object
233 234 235 |
# File 'lib/build/files/state.rb', line 233 def changed! @on_changed.call(@state) if @state.update! end |
#commit! ⇒ Object
221 222 223 |
# File 'lib/build/files/state.rb', line 221 def commit! @state.update! end |
#directories ⇒ Object
225 226 227 |
# File 'lib/build/files/state.rb', line 225 def directories @state.files.roots end |
#remove! ⇒ Object
229 230 231 |
# File 'lib/build/files/state.rb', line 229 def remove! monitor.delete(self) end |