Sha256: e1b66a818386d55bb1731c223d3ef40ac673a6905dccfcd952ba645ff940075b

Contents?: true

Size: 382 Bytes

Versions: 16

Compression:

Stored size: 382 Bytes

Contents

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

require 'cl'

class Add < Cl::Cmd
  opt '--active BOOL', type: :boolean
  opt '--retries INT', type: :integer
  opt '--sleep FLOAT', type: :float

  def run
    p active.class, retries.class, sleep.class
  end
end

Cl.new('owners').run(%w(add --active yes --retries 1 --sleep 0.1))

# Output:
#
#   TrueClass
#   Integer
#   Float

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
cl-0.1.28 examples/readme/type
cl-0.1.27 examples/readme/type
cl-0.1.26 examples/readme/type
cl-0.1.25 examples/readme/type
cl-0.1.24 examples/readme/type
cl-0.1.23 examples/readme/type
cl-0.1.22 examples/readme/type
cl-0.1.21 examples/readme/type
cl-0.1.20 examples/readme/type
cl-0.1.19 examples/readme/type
cl-0.1.18 examples/readme/type
cl-0.1.17 examples/readme/type
cl-0.1.16 examples/readme/type
cl-0.1.15 examples/readme/type
cl-0.1.14 examples/readme/type
cl-0.1.13 examples/readme/type