Sha256: 46df1e9318e6023715a5cc549859d7f8c7dd0f658d220ac4c0e50886d9b56da7
Contents?: true
Size: 702 Bytes
Versions: 12
Compression:
Stored size: 702 Bytes
Contents
#!/usr/bin/env ruby $: << File.expand_path('lib') <%= run sq(<<-'rb') module Git class Pull < Cl::Cmd register :'git:pull' 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
12 entries across 12 versions & 1 rubygems