Class: SepaReasonCodes::Code
- Inherits:
-
Object
- Object
- SepaReasonCodes::Code
- Defined in:
- lib/sepa_reason_codes/code.rb
Constant Summary collapse
- ATTRS =
%i[code iso_name description probable_status].freeze
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(code:, iso_name:, description:, probable_status:) ⇒ Code
constructor
A new instance of Code.
Constructor Details
#initialize(code:, iso_name:, description:, probable_status:) ⇒ Code
Returns a new instance of Code.
9 10 11 12 13 14 |
# File 'lib/sepa_reason_codes/code.rb', line 9 def initialize(code:, iso_name:, description:, probable_status:) @code = code @iso_name = iso_name @description = description @probable_status = probable_status end |
Instance Method Details
#==(other) ⇒ Object
16 17 18 19 20 |
# File 'lib/sepa_reason_codes/code.rb', line 16 def ==(other) ATTRS.all? do |attribute| other.public_send(attribute) == public_send(attribute) end end |