Sha256: 6178cb9a3a245bf96e4ce66380a430a2695e3a84ca3d74eac863affcfe432e69

Contents?: true

Size: 281 Bytes

Versions: 7

Compression:

Stored size: 281 Bytes

Contents

require "time"

module Getto
  module Roda
    class Time
      def initialize(now:, time_zone:)
        @time_zone = time_zone
        @now = now
      end

      attr_reader :now

      def parse(str)
        @time_zone.local_to_utc ::Time.parse(str)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
getto-roda-1.1.3 lib/getto/roda/time.rb
getto-roda-1.1.2 lib/getto/roda/time.rb
getto-roda-1.1.1 lib/getto/roda/time.rb
getto-roda-1.1.0 lib/getto/roda/time.rb
getto-roda-1.0.0 lib/getto/roda/time.rb
getto-roda-0.1.0 lib/getto/roda/time.rb
getto-roda-0.2.0 lib/getto/roda/time.rb