Class: Trevl::Validator::Result
- Inherits:
-
Struct
- Object
- Struct
- Trevl::Validator::Result
- Defined in:
- lib/trevl/validator.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#valid? ⇒ Object
Returns the value of attribute valid?.
Instance Method Summary collapse
Instance Attribute Details
#errors ⇒ Object
Returns the value of attribute errors
11 12 13 |
# File 'lib/trevl/validator.rb', line 11 def errors @errors end |
#valid? ⇒ Object
Returns the value of attribute valid?
11 12 13 |
# File 'lib/trevl/validator.rb', line 11
def valid?
@valid?
end
|
Instance Method Details
#to_s ⇒ Object
12 13 14 15 |
# File 'lib/trevl/validator.rb', line 12 def to_s return "Valid" if valid? errors.map { |e| "- #{e}" }.join("\n") end |