Class: CreateGithubRelease::CommandLine::Validations::ValidateOnlyQuietOrVerbose Private

Inherits:
Base
  • Object
show all
Defined in:
lib/create_github_release/command_line/validations.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Validate that either quiet or verbose is given, but not both

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from CreateGithubRelease::CommandLine::Validations::Base

Instance Method Details

#errorString+

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Called when valid? is false to return the error messages

Returns:

  • (String, Array<String>)


162
# File 'lib/create_github_release/command_line/validations.rb', line 162

def error = '--quiet and --verbose cannot be used together'

#valid?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns true if at most only one of #quiet or #verbose is true

Returns:

  • (Boolean)


157
# File 'lib/create_github_release/command_line/validations.rb', line 157

def valid? = !options.quiet || !options.verbose