Sha256: 2f3fbb5f803abeaae1dbc1e2db03551071211ae4924ac65c19c6b9cf5eee9845

Contents?: true

Size: 374 Bytes

Versions: 5

Compression:

Stored size: 374 Bytes

Contents

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

require 'cl'

class Add < Cl::Cmd
  opt '--to GROUP'
  opt '--password PASS', secret: true

  def run
    puts [:secret?, self.class.opts[:password].secret?].join(' ')
    puts [:tainted?, password.tainted?].join(' ')
  end
end

Cl.new('owners').run(%w(add --password pass))

# Output:
#
#   secret? true
#   tainted? true

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cl-0.1.28 examples/readme/secret
cl-0.1.27 examples/readme/secret
cl-0.1.26 examples/readme/secret
cl-0.1.25 examples/readme/secret
cl-0.1.24 examples/readme/secret