Module: RunLengthEncoder::Converters
- Defined in:
- lib/run_length_encoder.rb
Class Method Summary collapse
Class Method Details
.integer_array(splits) ⇒ Object
16 17 18 19 20 |
# File 'lib/run_length_encoder.rb', line 16 def self.integer_array(splits) splits.reduce([]) do |acc, (count, n)| acc + count.times.map { n.to_i } end end |