Class: VerifiedHolidays::Verifier::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/verified_holidays/verifier.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#extraObject (readonly)

Returns the value of attribute extra.



6
7
8
# File 'lib/verified_holidays/verifier.rb', line 6

def extra
  @extra
end

#mismatchedObject (readonly)

Returns the value of attribute mismatched.



6
7
8
# File 'lib/verified_holidays/verifier.rb', line 6

def mismatched
  @mismatched
end

#missingObject (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

Returns:

  • (Boolean)


14
15
16
# File 'lib/verified_holidays/verifier.rb', line 14

def valid?
  missing.empty? && extra.empty? && mismatched.empty?
end