Sha256: 8f4fd17e080e72ff6f7c6f5493db7bec9bf649b90d709093a15bda263109236b

Contents?: true

Size: 441 Bytes

Versions: 2

Compression:

Stored size: 441 Bytes

Contents

module Taric
  module Operation
    module Base
      BASE_URL_FN = -> version {"https://{host}/api/lol/{region}/#{version}"}

      # Converts [Time] to [Fixnum], or returns argument.
      #
      # @param time [Time] Time to convert to epoch.
      # @return [Fixnum] Time in epoch milliseconds.``
      def epoch_milliseconds(time)
        return (time.to_f * 1000).to_i if time.instance_of? Time
        time
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
taric-0.4.0 lib/taric/operation/base.rb
taric-0.3.4 lib/taric/operation/base.rb