Class: BCDD::Contract::RespondTo::Checking
- Inherits:
-
Object
- Object
- BCDD::Contract::RespondTo::Checking
- Includes:
- Core::Checking
- Defined in:
- lib/bcdd/ext/contract/respond_to.rb
Instance Method Summary collapse
- #errors_message ⇒ Object
-
#initialize(method_names, value) ⇒ Checking
constructor
A new instance of Checking.
Constructor Details
#initialize(method_names, value) ⇒ Checking
Returns a new instance of Checking.
9 10 11 12 13 14 |
# File 'lib/bcdd/ext/contract/respond_to.rb', line 9 def initialize(method_names, value) @value = value @errors = [] validate(method_names, @errors) end |
Instance Method Details
#errors_message ⇒ Object
16 17 18 |
# File 'lib/bcdd/ext/contract/respond_to.rb', line 16 def valid? ? '' : errors[0] end |