Sha256: 10e031987d0f48802de2d0d784faa7cb4b2ebd15173294c13563eb9581a7e5d6

Contents?: true

Size: 411 Bytes

Versions: 6

Compression:

Stored size: 411 Bytes

Contents

# frozen_string_literal: true

module SmtpMock
  module Cli
    Command = ::Struct.new(:install_path, :sudo, :success, :message) do
      include Resolver
    end

    def self.call(command_line_args, command = SmtpMock::Cli::Command)
      command.new.tap do |cmd|
        cmd.resolve(command_line_args)
        ::Kernel.puts(cmd.message)
        ::Kernel.exit(cmd.success ? 0 : 1)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
smtp_mock-1.1.0 lib/smtp_mock/cli.rb
smtp_mock-1.0.1 lib/smtp_mock/cli.rb
smtp_mock-1.0.0 lib/smtp_mock/cli.rb
smtp_mock-0.1.2 lib/smtp_mock/cli.rb
smtp_mock-0.1.1 lib/smtp_mock/cli.rb
smtp_mock-0.1.0 lib/smtp_mock/cli.rb