Class: FSSM::State::Directory
- Inherits:
-
Object
- Object
- FSSM::State::Directory
- Defined in:
- lib/fssm/state/directory.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(path, options = {}) ⇒ Directory
constructor
A new instance of Directory.
- #refresh(base = nil, skip_callbacks = false) ⇒ Object
Constructor Details
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
3 4 5 |
# File 'lib/fssm/state/directory.rb', line 3 def path @path end |
Instance Method Details
#refresh(base = nil, skip_callbacks = false) ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/fssm/state/directory.rb', line 11 def refresh(base=nil, skip_callbacks=false) base_path = FSSM::Pathname.for(base || @path.to_pathname). previous, current = recache(base_path) unless skip_callbacks deleted(previous, current) created(previous, current) modified(previous, current) end end |