Sha256: eb03c22e643a0700b1389e2d9ab2f8bcaa642a70e150b60b50ead56bdf1eb6db
Contents?: true
Size: 398 Bytes
Versions: 16
Compression:
Stored size: 398 Bytes
Contents
# frozen_string_literal: false require 'rubygems/optparse/lib/optparse' require 'date' Gem::OptionParser.accept(DateTime) do |s,| begin DateTime.parse(s) if s rescue ArgumentError raise Gem::OptionParser::InvalidArgument, s end end Gem::OptionParser.accept(Date) do |s,| begin Date.parse(s) if s rescue ArgumentError raise Gem::OptionParser::InvalidArgument, s end end
Version data entries
16 entries across 16 versions & 1 rubygems