Sha256: 03dd0e1edcb1e7de9c44dd58a65f583bd2f7bccc64f52bcaf52e0a7a445c4a62

Contents?: true

Size: 251 Bytes

Versions: 16

Compression:

Stored size: 251 Bytes

Contents

# frozen_string_literal: false
require 'rubygems/optparse/lib/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

16 entries across 16 versions & 1 rubygems

Version Path
rubygems-update-3.2.34 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.3.11 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.3.10 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.3.9 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.3.8 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.3.7 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.3.6 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.3.5 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.3.4 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.3.3 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.3.2 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.3.1 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.3.0 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.2.33 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.2.32 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.2.31 lib/rubygems/optparse/lib/optparse/time.rb