Class: CreateGithubRelease::CommandLine::Validations::Base

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

Overview

All validation classes inherit this classes initializer and options reader

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Base

Create a new validation object with the given options

Examples:

class ValidatePreFlag < Base
  def validate
    options.pre == false || %w[major minor patch].include?(options.release_type)
  end
end

Parameters:



31
32
33
# File 'lib/create_github_release/command_line/validations.rb', line 31

def initialize(options)
  @options = options
end