Sha256: bda5a756310002eef43e6e4b6021efd6c395a112bb9206737e424d809a757aaa

Contents?: true

Size: 315 Bytes

Versions: 15

Compression:

Stored size: 315 Bytes

Contents

#!/usr/bin/env ruby
$: << File.expand_path('lib')

require 'cl'

class Cmd < Cl::Cmd
  arg :one, type: :integer
  arg :two, type: :float
  arg :three, type: :boolean

  def run
    p [one.class, two.class, three.class]
  end
end

Cl.new('owners').run(%w(cmd 1 2.1 yes))

# Output:
#
#   [Integer, Float, TrueClass]

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
cl-1.2.2 examples/readme/arg_type
cl-1.2.1 examples/readme/arg_type
cl-1.2.0 examples/readme/arg_type
cl-1.1.5 examples/readme/arg_type
cl-1.1.4 examples/readme/arg_type
cl-1.1.3 examples/readme/arg_type
cl-1.1.2 examples/readme/arg_type
cl-1.1.1 examples/readme/arg_type
cl-1.1.0 examples/readme/arg_type
cl-1.0.5 examples/readme/arg_type
cl-1.0.4 examples/readme/arg_type
cl-1.0.3 examples/readme/arg_type
cl-1.0.2 examples/readme/arg_type
cl-1.0.1 examples/readme/arg_type
cl-1.0.0 examples/readme/arg_type