Sha256: 7f07050354fb7609bcb583ef77b48d1335f663f97e5737df14ebb3abc75d6cf2

Contents?: true

Size: 510 Bytes

Versions: 2

Compression:

Stored size: 510 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]
        Cpflow::Cli.start(["version"])
      else
        Cpflow::Cli.start(["help"])
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cpflow-3.0.1 lib/command/no_command.rb
cpflow-3.0.0 lib/command/no_command.rb