Sha256: 2d429e96196fdf0a73efc6557a5f56c2a694866884bde7b3bf3566757f848094

Contents?: true

Size: 644 Bytes

Versions: 4

Compression:

Stored size: 644 Bytes

Contents

# frozen_string_literal: true

require File.expand_path("mercenary/version", __dir__)
require "optparse"
require "logger"

module Mercenary
  autoload :Command,   File.expand_path("mercenary/command", __dir__)
  autoload :Option,    File.expand_path("mercenary/option", __dir__)
  autoload :Presenter, File.expand_path("mercenary/presenter", __dir__)
  autoload :Program,   File.expand_path("mercenary/program", __dir__)

  # Public: Instantiate a new program and execute.
  #
  # name - the name of your program
  #
  # Returns nothing.
  def self.program(name)
    program = Program.new(name)
    yield program
    program.go(ARGV)
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
mercenary-0.4.0 lib/mercenary.rb
pedrozath-mercenary-0.3.8 lib/pedrozath-mercenary.rb
pedrozath-mercenary-0.3.7 lib/pedrozath-mercenary.rb
pedrozath-mercenary-0.3.6 lib/mercenary.rb