Sha256: 1593cc56448f528981ce0333eaec5b0ba28fa5b077986fff8503cc50b4f894f6

Contents?: true

Size: 544 Bytes

Versions: 8

Compression:

Stored size: 544 Bytes

Contents

module SimpleCommander
  module Delegates
    %w(
      add_command
      command
      program
			helpers
      run!
      global_option
      alias_command
      default_command
      always_trace!
      never_trace!
    ).each do |meth|
      eval <<-END, binding, __FILE__, __LINE__
        def #{meth}(*args, &block)
          ::SimpleCommander::Runner.instance.#{meth}(*args, &block)
        end
      END
    end

    def defined_commands(*args, &block)
      ::SimpleCommander::Runner.instance.commands(*args, &block)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
simple_commander-0.6.1 lib/simple_commander/delegates.rb
simple_commander-0.6.0 lib/simple_commander/delegates.rb
simple_commander-0.5.1 lib/simple_commander/delegates.rb
simple_commander-0.5.0 lib/simple_commander/delegates.rb
simple_commander-0.4.0 lib/simple_commander/delegates.rb
simple_commander-0.3.1 lib/simple_commander/delegates.rb
simple_commander-0.3.0 lib/simple_commander/delegates.rb
simple_commander-0.1.0 lib/simple_commander/delegates.rb