Sha256: a7ba393c9ff14bba4dd3b822f29f0e77bcc4b6a58a3d418c1965a81279ac1801

Contents?: true

Size: 536 Bytes

Versions: 2

Compression:

Stored size: 536 Bytes

Contents

module Quickl
  
  # Instance method for being a single command
  module Command::Single
    
    # Command arguments after options parsing
    attr_reader :args

    # Run the command by delegation
    def _run(argv = [])
      execute(parse_options(argv))
    end
    
  end # module Command::Single
  
  #
  # Create a single command
  #
  def self.Command(*args)
    command_builder do |b|
      b.document *args
      b.instance_module Command::Single
      yield(b) if block_given?
    end
    Command
  end
  
end # module Quickl

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
quickl-0.2.2 lib/quickl/command/single.rb
quickl-0.2.1 lib/quickl/command/single.rb