Sha256: 2de7315e5237b3bf5fcb44b73e2e61e1b13311383729dc9052315de02bd377e2

Contents?: true

Size: 700 Bytes

Versions: 3

Compression:

Stored size: 700 Bytes

Contents

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

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

    class Add < Cl::Cmd
      register :add

      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

3 entries across 3 versions & 2 rubygems

Version Path
travis-cl-1.2.4 examples/_src/readme/negate.erb.rb
cl-1.2.4 examples/_src/readme/negate.erb.rb
cl-1.2.3 examples/_src/readme/negate.erb.rb