Sha256: 8cade749f210898f6f2977c196b018c8cbb050c9f72838b8321c7522bfb55c11

Contents?: true

Size: 241 Bytes

Versions: 66

Compression:

Stored size: 241 Bytes

Contents

# frozen_string_literal: false
require_relative '../optparse'
require 'time'

Gem::OptionParser.accept(Time) do |s,|
  begin
    (Time.httpdate(s) rescue Time.parse(s)) if s
  rescue
    raise Gem::OptionParser::InvalidArgument, s
  end
end

Version data entries

66 entries across 66 versions & 1 rubygems

Version Path
rubygems-update-3.6.3 lib/rubygems/vendor/optparse/lib/optparse/time.rb
rubygems-update-3.6.2 lib/rubygems/vendor/optparse/lib/optparse/time.rb
rubygems-update-3.6.1 lib/rubygems/vendor/optparse/lib/optparse/time.rb
rubygems-update-3.6.0 lib/rubygems/vendor/optparse/lib/optparse/time.rb
rubygems-update-3.5.23 lib/rubygems/vendor/optparse/lib/optparse/time.rb
rubygems-update-3.5.22 lib/rubygems/vendor/optparse/lib/optparse/time.rb
rubygems-update-3.5.21 lib/rubygems/vendor/optparse/lib/optparse/time.rb
rubygems-update-3.5.20 lib/rubygems/vendor/optparse/lib/optparse/time.rb
rubygems-update-3.5.19 lib/rubygems/vendor/optparse/lib/optparse/time.rb
rubygems-update-3.5.18 lib/rubygems/vendor/optparse/lib/optparse/time.rb
rubygems-update-3.5.17 lib/rubygems/vendor/optparse/lib/optparse/time.rb
rubygems-update-3.5.16 lib/rubygems/vendor/optparse/lib/optparse/time.rb
rubygems-update-3.5.15 lib/rubygems/vendor/optparse/lib/optparse/time.rb
rubygems-update-3.5.14 lib/rubygems/vendor/optparse/lib/optparse/time.rb
rubygems-update-3.5.13 lib/rubygems/vendor/optparse/lib/optparse/time.rb
rubygems-update-3.5.12 lib/rubygems/vendor/optparse/lib/optparse/time.rb
rubygems-update-3.5.10 lib/rubygems/vendor/optparse/lib/optparse/time.rb
rubygems-update-3.5.9 lib/rubygems/vendor/optparse/lib/optparse/time.rb
rubygems-update-3.5.8 lib/rubygems/vendor/optparse/lib/optparse/time.rb
rubygems-update-3.5.7 lib/rubygems/vendor/optparse/lib/optparse/time.rb