Class: Hecks::Adapters::Validator
- Inherits:
-
Object
- Object
- Hecks::Adapters::Validator
- Defined in:
- lib/hecks-validator.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(command:) ⇒ Validator
constructor
A new instance of Validator.
Constructor Details
#initialize(command:) ⇒ Validator
Returns a new instance of Validator.
6 7 8 9 10 |
# File 'lib/hecks-validator.rb', line 6 def initialize(command:) @args = command.args @head_spec = command.domain_module.head @errors = {} end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
4 5 6 |
# File 'lib/hecks-validator.rb', line 4 def errors @errors end |
Instance Method Details
#call ⇒ Object
12 13 14 15 |
# File 'lib/hecks-validator.rb', line 12 def call validate return self end |