Class: BCDD::Contract::List::Checking
- Inherits:
-
Object
- Object
- BCDD::Contract::List::Checking
- Includes:
- Core::Checking
- Defined in:
- lib/bcdd/contract/list.rb
Instance Attribute Summary
Attributes included from Core::Checking
Instance Method Summary collapse
- #errors_message ⇒ Object
-
#initialize(checker, value) ⇒ Checking
constructor
A new instance of Checking.
Methods included from Core::Checking
#invalid?, #raise_validation_errors!, #valid?, #value_or_raise_validation_errors!
Constructor Details
#initialize(checker, value) ⇒ Checking
Returns a new instance of Checking.
8 9 10 11 12 13 |
# File 'lib/bcdd/contract/list.rb', line 8 def initialize(checker, value) @value = value @errors = [] validate(checker, @errors) end |
Instance Method Details
#errors_message ⇒ Object
15 16 17 |
# File 'lib/bcdd/contract/list.rb', line 15 def valid? ? '' : "(#{errors.join('; ')})" end |