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.5.6 lib/rubygems/vendor/optparse/lib/optparse/time.rb
rubygems-update-3.5.5 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.5.4 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.5.3 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.5.2 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.5.1 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.5.0 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.3.27 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.4.22 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.4.21 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.4.20 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.4.19 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.4.18 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.4.17 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.4.16 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.4.15 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.4.14 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.4.13 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.4.12 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.4.11 lib/rubygems/optparse/lib/optparse/time.rb