Class: Rosette::Core::Validators::Validator
- Inherits:
-
Object
- Object
- Rosette::Core::Validators::Validator
- Defined in:
- lib/rosette/core/validators/validator.rb
Overview
Base class for validators.
Direct Known Subclasses
CommitValidator, EncodingValidator, LocaleValidator, RepoValidator, SerializerValidator
Instance Attribute Summary collapse
-
#options ⇒ Hash
readonly
A hash of options.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Validator
constructor
Creates a new validator.
-
#messages ⇒ Array<String>
An array of error messages.
Constructor Details
#initialize(options = {}) ⇒ Validator
Creates a new validator.
17 18 19 |
# File 'lib/rosette/core/validators/validator.rb', line 17 def initialize( = {}) = end |
Instance Attribute Details
#options ⇒ Hash (readonly)
Returns a hash of options.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/rosette/core/validators/validator.rb', line 11 class Validator attr_reader :options # Creates a new validator. # # @param [Hash] options A hash of options. def initialize( = {}) = end # An array of error messages. Populated when +#valid?+ is called. # # @return [Array<String>] The list of error messages. def ||= [] end end |
Instance Method Details
#messages ⇒ Array<String>
An array of error messages. Populated when #valid? is called.
24 25 26 |
# File 'lib/rosette/core/validators/validator.rb', line 24 def ||= [] end |