Sha256: cc7c2c2992a41d8ad704e1ad6cccc13b812bfbff1f46cb0b07a71b9cf5cb4e64

Contents?: true

Size: 637 Bytes

Versions: 12

Compression:

Stored size: 637 Bytes

Contents

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

module Git
  class Pull < Cl::Cmd
    register :'git:pull'

    def run
      p cmd: registry_key, args: args
    end
  end
end

# With this class registered (and assuming the executable that calls `Cl` is
# `bin/run`) the default runner would recognize and run it:
#
# $ bin/run git:pull master # instantiates Git::Pull, and passes ["master"] as args
# $ bin/run git pull master # does the same

Cl.new('run').run(%w(git:pull master))
# Output:
#
#   {:cmd=>:"git:pull", :args=>["master"]}

Cl.new('run').run(%w(git pull master))
# Output:
#
#   {:cmd=>:"git:pull", :args=>["master"]}

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
cl-1.2.0 examples/readme/runner
cl-1.1.5 examples/readme/runner
cl-1.1.4 examples/readme/runner
cl-1.1.3 examples/readme/runner
cl-1.1.2 examples/readme/runner
cl-1.1.1 examples/readme/runner
cl-1.1.0 examples/readme/runner
cl-1.0.5 examples/readme/runner
cl-1.0.4 examples/readme/runner
cl-1.0.3 examples/readme/runner
cl-1.0.2 examples/readme/runner
cl-1.0.1 examples/readme/runner