Class: Moku::Validator::Validator

Inherits:
Object
  • Object
show all
Defined in:
lib/moku/validator/validator.rb

Overview

Perform a set of validations on an artifact or release

Direct Known Subclasses

RubyVersion

Instance Method Summary collapse

Constructor Details

#initialize(target) ⇒ Validator

Returns a new instance of Validator.


8
9
10
11
# File 'lib/moku/validator/validator.rb', line 8

def initialize(target)
  @target = target
  @errors = []
end

Instance Method Details

#errorsObject


13
14
15
16
# File 'lib/moku/validator/validator.rb', line 13

def errors
  validate
  @errors
end

#valid?Boolean

Returns:

  • (Boolean)

18
19
20
21
# File 'lib/moku/validator/validator.rb', line 18

def valid?
  validate
  errors.empty?
end