Class: VerifiedHolidays::Verifier::Result
- Inherits:
-
Object
- Object
- VerifiedHolidays::Verifier::Result
- Defined in:
- lib/verified_holidays/verifier.rb
Instance Attribute Summary collapse
-
#extra ⇒ Object
readonly
Returns the value of attribute extra.
-
#mismatched ⇒ Object
readonly
Returns the value of attribute mismatched.
-
#missing ⇒ Object
readonly
Returns the value of attribute missing.
Instance Method Summary collapse
-
#initialize(missing:, extra:, mismatched:) ⇒ Result
constructor
A new instance of Result.
- #valid? ⇒ Boolean
Constructor Details
#initialize(missing:, extra:, mismatched:) ⇒ Result
Returns a new instance of Result.
8 9 10 11 12 |
# File 'lib/verified_holidays/verifier.rb', line 8 def initialize(missing:, extra:, mismatched:) @missing = missing @extra = extra @mismatched = mismatched end |
Instance Attribute Details
#extra ⇒ Object (readonly)
Returns the value of attribute extra.
6 7 8 |
# File 'lib/verified_holidays/verifier.rb', line 6 def extra @extra end |
#mismatched ⇒ Object (readonly)
Returns the value of attribute mismatched.
6 7 8 |
# File 'lib/verified_holidays/verifier.rb', line 6 def mismatched @mismatched end |
#missing ⇒ Object (readonly)
Returns the value of attribute missing.
6 7 8 |
# File 'lib/verified_holidays/verifier.rb', line 6 def missing @missing end |
Instance Method Details
#valid? ⇒ Boolean
14 15 16 |
# File 'lib/verified_holidays/verifier.rb', line 14 def valid? missing.empty? && extra.empty? && mismatched.empty? end |