Sha256: 956278bf170fca5bcc1329c48c26a8a0958c0724f39b5b0341c349da1f36b34c

Contents?: true

Size: 679 Bytes

Versions: 15

Compression:

Stored size: 679 Bytes

Contents

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

<%= run sq(<<-'rb')
    require 'cl'

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

      def run
        p notifications?
      end
    end
  rb
-%>

<%= run "Cl.new('owners').run(%w(add --notifications))" %>

<%= out 'true' %>

<%= run "Cl.new('owners').run(%w(add --no_notifications))" %>

<%= out 'false' %>

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

<%= out 'false' %>

<%= run "Cl.new('owners').run(%w(add --skip_notifications))" %>

<%= out 'false' %>

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

<%= out 'false' %>

Version data entries

15 entries across 15 versions & 1 rubygems

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