Class: Kibo::Sort
- Inherits:
-
Object
- Object
- Kibo::Sort
- Defined in:
- lib/kibo/sort.rb
Instance Method Summary collapse
-
#initialize(arr, type) ⇒ Sort
constructor
A new instance of Sort.
Constructor Details
#initialize(arr, type) ⇒ Sort
3 4 5 6 7 8 9 10 |
# File 'lib/kibo/sort.rb', line 3 def initialize(arr, type) case type when 'merge' eval("Merge.new(#{arr})") when 'quick' eval("Quick.new(#{arr})") end end |