Class: GeneticAlgorithms::NaturalHash
- Inherits:
-
Hash
- Object
- Hash
- GeneticAlgorithms::NaturalHash
- Defined in:
- lib/genetic_algorithms/natural_hash.rb
Instance Method Summary collapse
Instance Method Details
#map ⇒ Object
3 4 5 6 |
# File 'lib/genetic_algorithms/natural_hash.rb', line 3 def map result = super() hash_structure?(result) ? NaturalHash[ result ] : result end |
#sort_by ⇒ Object
8 9 10 |
# File 'lib/genetic_algorithms/natural_hash.rb', line 8 def sort_by NaturalHash[ super ] end |