class Maruto::ModuleDefinition::ModuleSorter

Public Class Methods

new(h) click to toggle source
# File lib/maruto/module_definition.rb, line 63
def initialize(h)
        @h = h
end

Public Instance Methods

sorted() click to toggle source
# File lib/maruto/module_definition.rb, line 72
def sorted
        tsort.map { |mod_name| @h[mod_name] }
end
tsort_each_child(mod_name, &block) click to toggle source
# File lib/maruto/module_definition.rb, line 69
def tsort_each_child(mod_name, &block)
        @h[mod_name][:dependencies].each(&block) if @h[mod_name].include? :dependencies
end
tsort_each_node(&block) click to toggle source
# File lib/maruto/module_definition.rb, line 66
def tsort_each_node(&block)
        @h.each_key(&block)
end