Sha256: 2a04a28bdd85eb361ab1d450fdb0e3d2dfe5a620730b774e07715e0417a70489

Contents?: true

Size: 512 Bytes

Versions: 3

Compression:

Stored size: 512 Bytes

Contents

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

require 'cl'

class Add < Cl::Cmd
  opt '--notifications', 'Send out notifications to the team', negate: %w(skip)

  def run
    p notifications?
  end
end

Cl.new('owners').run(%w(add --notifications))
# => true

Cl.new('owners').run(%w(add --no_notifications))
# => false

Cl.new('owners').run(%w(add --no-notifications))
# => false

Cl.new('owners').run(%w(add --skip_notifications))
# => false

Cl.new('owners').run(%w(add --skip-notifications))
# => false

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cl-0.1.28 examples/readme/negate
cl-0.1.27 examples/readme/negate
cl-0.1.26 examples/readme/negate