Class: CreateGithubRelease::CommandLine::Validations::ValidateLastReleaseVersion 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 the last release version (if given) is a valid gem version

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>)


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

def error = "--last-release-version='#{options.last_release_version}' is not valid"

#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 the #last_release_version is nil or is a valid gem version

Returns:

  • (Boolean)


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

def valid? = options.last_release_version.nil? || valid_gem_version?(options.last_release_version)