Class: FSSM::State
- Inherits:
-
Object
- Object
- FSSM::State
- Defined in:
- lib/vendor/fssm/state.rb
Instance Method Summary collapse
-
#initialize(path) ⇒ State
constructor
A new instance of State.
- #refresh(base = nil, skip_callbacks = false) ⇒ Object
Constructor Details
#initialize(path) ⇒ State
Returns a new instance of State.
3 4 5 6 |
# File 'lib/vendor/fssm/state.rb', line 3 def initialize(path) @path = path @cache = FSSM::Tree::Cache.new end |
Instance Method Details
#refresh(base = nil, skip_callbacks = false) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/vendor/fssm/state.rb', line 8 def refresh(base=nil, skip_callbacks=false) previous, current = recache(base || @path.to_pathname) unless skip_callbacks deleted(previous, current) created(previous, current) modified(previous, current) end end |