Sha256: a9b6e07478ebe66b355187662a40aacbc865c4024b0ec01063db5746a94b3c43

Contents?: true

Size: 247 Bytes

Versions: 15

Compression:

Stored size: 247 Bytes

Contents

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

require 'cl'

class Add < Cl::Cmd
  arg :owners, type: :array, sep: ','

  def run
    p owners: owners
  end
end

Cl.new('owners').run(%w(add one,two))

# Output:
#
#   {:owners=>["one", "two"]}

Version data entries

15 entries across 15 versions & 1 rubygems

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