Class: Retab::ReconciliationAlignment
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::ReconciliationAlignment
- Defined in:
- lib/retab/consensus/reconciliation_alignment.rb
Constant Summary collapse
- HASH_ATTRS =
{ aligned_inputs: :aligned_inputs, path_alignments: :path_alignments, reference_index: :reference_index }.freeze
Instance Attribute Summary collapse
-
#aligned_inputs ⇒ Object
Returns the value of attribute aligned_inputs.
-
#path_alignments ⇒ Object
Returns the value of attribute path_alignments.
-
#reference_index ⇒ Object
Returns the value of attribute reference_index.
Instance Method Summary collapse
-
#initialize(json) ⇒ ReconciliationAlignment
constructor
A new instance of ReconciliationAlignment.
Constructor Details
#initialize(json) ⇒ ReconciliationAlignment
Returns a new instance of ReconciliationAlignment.
20 21 22 23 24 25 26 27 28 |
# File 'lib/retab/consensus/reconciliation_alignment.rb', line 20 def initialize(json) super() hash = self.class.normalize(json) @aligned_inputs = (hash[:aligned_inputs] || []).map { |item| item || {} } @path_alignments = (hash[:path_alignments] || []).map { |item| item ? Retab::ReconciliationPathAlignment.new(item) : nil } @reference_index = hash[:reference_index] end |
Instance Attribute Details
#aligned_inputs ⇒ Object
Returns the value of attribute aligned_inputs.
14 15 16 |
# File 'lib/retab/consensus/reconciliation_alignment.rb', line 14 def aligned_inputs @aligned_inputs end |
#path_alignments ⇒ Object
Returns the value of attribute path_alignments.
14 15 16 |
# File 'lib/retab/consensus/reconciliation_alignment.rb', line 14 def path_alignments @path_alignments end |
#reference_index ⇒ Object
Returns the value of attribute reference_index.
14 15 16 |
# File 'lib/retab/consensus/reconciliation_alignment.rb', line 14 def reference_index @reference_index end |