You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
asciinema.org/app/services/timing_parser.rb

13 lines
193 B
Ruby

class TimingParser
def self.parse(data)
data.lines.map { |line| parse_line(line) }
end
def self.parse_line(line)
delay, size = line.split
[delay.to_f, size.to_i]
end
end