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.4.10 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.4.9 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.4.8 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.4.7 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.4.6 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.4.5 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.4.4 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.4.3 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.4.2 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.4.1 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.4.0 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.3.26 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.3.25 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.3.24 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.3.23 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.3.22 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.3.21 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.3.20 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.3.19 lib/rubygems/optparse/lib/optparse/time.rb
rubygems-update-3.3.18 lib/rubygems/optparse/lib/optparse/time.rb