Class: Filterameter::DeclarationsValidator::FactoryErrors
- Inherits:
-
Object
- Object
- Filterameter::DeclarationsValidator::FactoryErrors
- Defined in:
- lib/filterameter/declarations_validator.rb
Overview
# Factory Errors
Class FactoryErrors is swapped in if the fetch from a factory fails. It is always invalid and provides the reason.
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(error) ⇒ FactoryErrors
constructor
A new instance of FactoryErrors.
- #to_s ⇒ Object
- #valid?(_) ⇒ Boolean
Constructor Details
#initialize(error) ⇒ FactoryErrors
79 80 81 |
# File 'lib/filterameter/declarations_validator.rb', line 79 def initialize(error) @errors = [wrap_if_unexpected(error)] end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
77 78 79 |
# File 'lib/filterameter/declarations_validator.rb', line 77 def errors @errors end |
Instance Method Details
#to_s ⇒ Object
87 88 89 |
# File 'lib/filterameter/declarations_validator.rb', line 87 def to_s @errors.join("\n") end |
#valid?(_) ⇒ Boolean
83 84 85 |
# File 'lib/filterameter/declarations_validator.rb', line 83 def valid?(_) false end |