Class: Html2rss::Config::ValidationResult
- Inherits:
-
Data
- Object
- Data
- Html2rss::Config::ValidationResult
- Defined in:
- lib/html2rss/config.rb,
lib/html2rss/config.rb
Overview
Duck-compatible with Dry::Validation::Result for resolve-time outcomes
(+#success?+, #errors#to_h). Used for parse failures so callers never see a Struct snowflake.
Instance Attribute Summary collapse
-
#errors_hash ⇒ Object
readonly
Returns the value of attribute errors_hash.
-
#success ⇒ Object
readonly
Returns the value of attribute success.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#errors_hash ⇒ Object (readonly)
Returns the value of attribute errors_hash
19 20 21 |
# File 'lib/html2rss/config.rb', line 19 def errors_hash @errors_hash end |
#success ⇒ Object (readonly)
Returns the value of attribute success
19 20 21 |
# File 'lib/html2rss/config.rb', line 19 def success @success end |
Class Method Details
.parse_failure(message) ⇒ Html2rss::Config::ValidationResult
28 29 30 |
# File 'lib/html2rss/config.rb', line 28 def self.parse_failure() new(success: false, errors_hash: { parse: [] }) end |
Instance Method Details
#errors ⇒ self
38 |
# File 'lib/html2rss/config.rb', line 38 def errors = self |
#success? ⇒ Boolean
34 |
# File 'lib/html2rss/config.rb', line 34 def success? = success |
#to_h ⇒ Hash
42 |
# File 'lib/html2rss/config.rb', line 42 def to_h = errors_hash |