Sha256: 5ced95fc14e21051262043493fc2813c68a4b897309563278aa71e7de5fbdb53
Contents?: true
Size: 379 Bytes
Versions: 53
Compression:
Stored size: 379 Bytes
Contents
require 'main' ARGV.replace %w( 42 ) if ARGV.empty? Main { argument('foo'){ required # this is the default cast :int # value cast to Fixnum validate{|foo| foo == 42} # raises error in failure case description 'the foo param' # shown in --help } def run p params['foo'].given? p params['foo'].value end }
Version data entries
53 entries across 52 versions & 3 rubygems