Class: Mobility::Plugin::DependencyResolver::DependencyTree

Inherits:
Hash
  • Object
show all
Includes:
TSort
Defined in:
lib/mobility/plugin.rb

Constant Summary collapse

NO_DEPENDENCIES =
Set.new.freeze

Instance Method Summary collapse

Instance Method Details

#add(key) ⇒ Object



227
228
229
# File 'lib/mobility/plugin.rb', line 227

def add(key)
  self[key] ||= NO_DEPENDENCIES
end

#tsort_each_child(dep, &block) ⇒ Object



233
234
235
# File 'lib/mobility/plugin.rb', line 233

def tsort_each_child(dep, &block)
  self.fetch(dep, []).each(&block)
end