Sha256: d7cc94170cd65c679f2745c20286f6ce2ac505b8dc7629ce7b559137ef720b73

Contents?: true

Size: 293 Bytes

Versions: 4

Compression:

Stored size: 293 Bytes

Contents

# frozen_string_literal: true

module AhlScraper
  class IceTimeHelper
    attr_reader :time

    def initialize(time)
      @time = time
    end

    def to_seconds
      ice_time = time.split(":")
      ice_time[0].to_i * 60 + ice_time[1].to_i
    end

    alias to_sec to_seconds
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ahl_scraper-0.3.1 lib/ahl_scraper/helpers/ice_time_helper.rb
ahl_scraper-0.3.0 lib/ahl_scraper/helpers/ice_time_helper.rb
ahl_scraper-0.2.0 lib/ahl_scraper/helpers/ice_time_helper.rb
ahl_scraper-0.1.1 lib/ahl_scraper/helpers/ice_time_helper.rb