Sha256: 1738c10a043035ebb31504cb4a96571a223046fc7560ee842590ecbc4e52ff8b

Contents?: true

Size: 504 Bytes

Versions: 4

Compression:

Stored size: 504 Bytes

Contents

# frozen_string_literal: true

module Command
  class NoCommand < Base
    NAME = "no-command"
    OPTIONS = [version_option].freeze
    DESCRIPTION = "Called when no command was specified"
    LONG_DESCRIPTION = <<~DESC
      - Called when no command was specified
    DESC
    HIDE = true
    WITH_INFO_HEADER = false
    VALIDATIONS = [].freeze

    def call
      if config.options[:version]
        Cpl::Cli.start(["version"])
      else
        Cpl::Cli.start(["help"])
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cpl-2.2.4 lib/command/no_command.rb
cpl-2.2.2 lib/command/no_command.rb
cpl-2.2.1 lib/command/no_command.rb
cpl-2.2.0 lib/command/no_command.rb