Module: PathFinder::ClassMethods

Defined in:
lib/path_finder.rb

Instance Method Summary collapse

Instance Method Details

#path_finder_added?Boolean

Returns:

  • (Boolean)


47
48
49
# File 'lib/path_finder.rb', line 47

def path_finder_added?
  true
end

#recreate_paths!(collection = nil) ⇒ Object

Recalculate all paths for given collection



52
53
54
55
56
57
58
# File 'lib/path_finder.rb', line 52

def recreate_paths!(collection = nil)
  raise 'No collection given' unless collection.is_a? Array
  collection.each do |obj|
    obj.recreate_path!
    self.recreate_paths!(obj.children) unless obj.children.empty?
  end
end