Class: Corkscrews::Validate::Result
- Inherits:
-
Struct
- Object
- Struct
- Corkscrews::Validate::Result
- Defined in:
- lib/corkscrews/validate.rb
Instance Attribute Summary collapse
-
#checks ⇒ Object
Returns the value of attribute checks.
Instance Method Summary collapse
Instance Attribute Details
#checks ⇒ Object
Returns the value of attribute checks
17 18 19 |
# File 'lib/corkscrews/validate.rb', line 17 def checks @checks end |
Instance Method Details
#ok? ⇒ Boolean
18 19 20 |
# File 'lib/corkscrews/validate.rb', line 18 def ok? checks.all? { |check| check[:ok] } end |
#to_h ⇒ Object
22 23 24 |
# File 'lib/corkscrews/validate.rb', line 22 def to_h { ok: ok?, checks: sanitize(checks) } end |