Sha256: fbf28e47ecf7792cf3043b4ca791391edd861af7fb104aba64e3a801588fda99

Contents?: true

Size: 417 Bytes

Versions: 17

Compression:

Stored size: 417 Bytes

Contents

<%= run sq(<<-'rb')
  # anywhere in your library

  require 'cl'

  class Runner
    Cl::Runner.register :custom, self

    def initialize(ctx, args)
      # ...
    end

    def run
      const = identify_cmd_class_from_args
      const.new(ctx, args).run
    end
  end
  rb
-%>

# in bin/run
Cl.new('run', runner: :custom).run(ARGV)

<% run "p Cl.new('run', runner: :custom).runner([]).class" %>
<% out 'Runner' %>

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
travis-cl-1.2.4 examples/_src/readme/runner_custom.erb.rb
cl-1.2.4 examples/_src/readme/runner_custom.erb.rb
cl-1.2.3 examples/_src/readme/runner_custom.erb.rb
cl-1.2.2 examples/_src/readme/runner_custom.erb.rb
cl-1.2.1 examples/_src/readme/runner_custom.erb.rb
cl-1.2.0 examples/_src/readme/runner_custom.erb.rb
cl-1.1.5 examples/_src/readme/runner_custom.erb.rb
cl-1.1.4 examples/_src/readme/runner_custom.erb.rb
cl-1.1.3 examples/_src/readme/runner_custom.erb.rb
cl-1.1.2 examples/_src/readme/runner_custom.erb.rb
cl-1.1.1 examples/_src/readme/runner_custom.erb.rb
cl-1.1.0 examples/_src/readme/runner_custom.erb.rb
cl-1.0.5 examples/_src/readme/runner_custom.erb.rb
cl-1.0.4 examples/_src/readme/runner_custom.erb.rb
cl-1.0.3 examples/_src/readme/runner_custom.erb.rb
cl-1.0.2 examples/_src/readme/runner_custom.erb.rb
cl-1.0.1 examples/_src/readme/runner_custom.erb.rb