Sha256: 8e4257cb3a720d27ad6ca3ebd3310979f988ebd74ef971beea3cb861ac38c809

Contents?: true

Size: 509 Bytes

Versions: 15

Compression:

Stored size: 509 Bytes

Contents

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

<%= run sq(<<-'rb')
  class Add < Cl::Cmd
    opt '--active BOOL', type: :boolean
    opt '--retries INT', type: :integer
    opt '--sleep FLOAT', type: :float

    def run
      p active: active.class, retries: retries.class, sleep: sleep.class
    end
  end
  rb
-%>

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

<%= out "{:active=>TrueClass, :retries=>#{RUBY_VERSION < '2.4' ? 'Fixnum' : 'Integer'}, :sleep=>Float}" %>

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
cl-1.2.2 examples/_src/readme/type.erb.rb
cl-1.2.1 examples/_src/readme/type.erb.rb
cl-1.2.0 examples/_src/readme/type.erb.rb
cl-1.1.5 examples/_src/readme/type.erb.rb
cl-1.1.4 examples/_src/readme/type.erb.rb
cl-1.1.3 examples/_src/readme/type.erb.rb
cl-1.1.2 examples/_src/readme/type.erb.rb
cl-1.1.1 examples/_src/readme/type.erb.rb
cl-1.1.0 examples/_src/readme/type.erb.rb
cl-1.0.5 examples/_src/readme/type.erb.rb
cl-1.0.4 examples/_src/readme/type.erb.rb
cl-1.0.3 examples/_src/readme/type.erb.rb
cl-1.0.2 examples/_src/readme/type.erb.rb
cl-1.0.1 examples/_src/readme/type.erb.rb
cl-1.0.0 examples/src/readme/type.erb.rb