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.
223 224 225 |
# File 'lib/build/files/state.rb', line 223 def monitor @monitor end |
Instance Method Details
#changed! ⇒ Object
237 238 239 |
# File 'lib/build/files/state.rb', line 237 def changed! @on_changed.call(@state) if @state.update! end |
#commit! ⇒ Object
225 226 227 |
# File 'lib/build/files/state.rb', line 225 def commit! @state.update! end |
#directories ⇒ Object
229 230 231 |
# File 'lib/build/files/state.rb', line 229 def directories @state.files.roots end |
#remove! ⇒ Object
233 234 235 |
# File 'lib/build/files/state.rb', line 233 def remove! monitor.delete(self) end |