Module: RangesMergerMerging
- Included in:
- RangesMerger
- Defined in:
- lib/ranges_merger/ranges_merger_merging.rb
Instance Method Summary collapse
-
#merge(_array) ⇒ Object
Merge for various objects (Array, Range).
Instance Method Details
#merge(_array) ⇒ Object
Merge for various objects (Array, Range). Result is
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/ranges_merger/ranges_merger_merging.rb', line 4 def merge(_array) klass = _array.first.class array = self.normalize_array(_array) result = self.merge_loop(array) if klass.to_s == "Range" return self.array_to_ranges(result) end return result end |