Module: FSSM::Tree::NodeInsertion

Includes:
NodeBase
Included in:
Cache
Defined in:
lib/fssm/tree.rb

Instance Method Summary collapse

Methods included from NodeBase

#initialize

Instance Method Details

#set(path) ⇒ Object



66
67
68
69
# File 'lib/fssm/tree.rb', line 66

def set(path)
  node = descendant!(path)
  node.from_path(path).mtime
end

#unset(path) ⇒ Object



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/fssm/tree.rb', line 48

def unset(path)
  key = key_segments(path)
  
  if key.empty?
    remove_children
    return nil
  end
  
  segment = key.pop
  node = descendant(key)
  
  return unless node
  
  node.remove_child(segment)
  
  nil
end