Class: Gitlab::Config::Entry::Validator

Inherits:
SimpleDelegator
  • Object
show all
Includes:
ActiveModel::Validations, Validators
Defined in:
lib/gitlab/config/entry/validator.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(entry) ⇒ Validator

Returns a new instance of Validator.


10
11
12
# File 'lib/gitlab/config/entry/validator.rb', line 10

def initialize(entry)
  super(entry)
end

Class Method Details

.nameObject


20
21
22
# File 'lib/gitlab/config/entry/validator.rb', line 20

def self.name
  'Validator'
end

Instance Method Details

#messagesObject


14
15
16
17
18
# File 'lib/gitlab/config/entry/validator.rb', line 14

def messages
  errors.full_messages.map do |error|
    "#{location} #{error}".downcase
  end
end