Class: Yogurt::CodeGenerator::DefinedClassSorter
- Inherits:
-
Object
- Object
- Yogurt::CodeGenerator::DefinedClassSorter
- Extended by:
- T::Sig
- Includes:
- TSort
- Defined in:
- lib/yogurt/code_generator/defined_class_sorter.rb
Instance Method Summary collapse
-
#initialize(classes) ⇒ DefinedClassSorter
constructor
A new instance of DefinedClassSorter.
- #sorted_classes ⇒ Object
Constructor Details
#initialize(classes) ⇒ DefinedClassSorter
Returns a new instance of DefinedClassSorter.
12 13 14 15 16 17 |
# File 'lib/yogurt/code_generator/defined_class_sorter.rb', line 12 def initialize(classes) @classes = T.let( classes.map {|k| [k.name, k]}.to_h, T::Hash[String, DefinedClass], ) end |
Instance Method Details
#sorted_classes ⇒ Object
20 21 22 |
# File 'lib/yogurt/code_generator/defined_class_sorter.rb', line 20 def sorted_classes tsort end |