Class: PolishGeeks::DevTools::Validators::Base Abstract
- Inherits:
-
Object
- Object
- PolishGeeks::DevTools::Validators::Base
- Defined in:
- lib/polish_geeks/dev_tools/validators/base.rb
Overview
This class is abstract.
Subclass and use
Base class for all the validators
Instance Method Summary collapse
-
#initialize(stored_output) ⇒ Base
constructor
A new instance of Base.
-
#valid? ⇒ Boolean
This should be implemented in a subclass.
-
#validate! ⇒ Boolean
If validation check is valid or not.
Constructor Details
#initialize(stored_output) ⇒ Base
Returns a new instance of Base.
8 9 10 |
# File 'lib/polish_geeks/dev_tools/validators/base.rb', line 8 def initialize(stored_output) @stored_output = stored_output end |
Instance Method Details
#valid? ⇒ Boolean
This should be implemented in a subclass
14 15 16 |
# File 'lib/polish_geeks/dev_tools/validators/base.rb', line 14 def valid? raise Errors::NotImplementedError end |
#validate! ⇒ Boolean
Returns if validation check is valid or not.
20 21 22 |
# File 'lib/polish_geeks/dev_tools/validators/base.rb', line 20 def validate! raise Errors::PreCommandValidationError unless valid? end |