Sha256: 7b12ac9bd44792c23128b5839c6422d8da0ab8884bbc7464eebb11c969471794

Contents?: true

Size: 476 Bytes

Versions: 3

Compression:

Stored size: 476 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

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cpl-1.4.0 lib/command/no_command.rb
cpl-1.3.0 lib/command/no_command.rb
cpl-1.2.0 lib/command/no_command.rb