Sha256: 9ebbbadcdeb08e8e4b93d4cf8c4cf12f0b60d31feba78367ce9a997fd9d0a942
Contents?: true
Size: 721 Bytes
Versions: 5
Compression:
Stored size: 721 Bytes
Contents
#!/usr/bin/env ruby $: << File.expand_path('lib') <%= run sq(<<-'rb') module Git class Pull < Cl::Cmd register :'git:pull' arg :branch def run p cmd: registry_key, args: args end end end rb -%> # 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 <%= run "Cl.new('run').run(%w(git:pull master))" %> <%= out '{:cmd=>:"git:pull", :args=>["master"]}' %> <%= run "Cl.new('run').run(%w(git pull master))" %> <%= out '{:cmd=>:"git:pull", :args=>["master"]}' %>
Version data entries
5 entries across 5 versions & 2 rubygems