Sha256: fb371d686f631e198ebe23b1414717b17acb7c0eea71ded86865ec5d2610adbf
Contents?: true
Size: 388 Bytes
Versions: 62
Compression:
Stored size: 388 Bytes
Contents
# frozen_string_literal: false require_relative '../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
62 entries across 62 versions & 1 rubygems