Class: Retab::ReconciliationField

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/retab/consensus/reconciliation_field.rb

Constant Summary collapse

HASH_ATTRS =
{
  likelihood: :likelihood,
  path: :path,
  supporting_input_count: :supporting_input_count,
  total_input_count: :total_input_count,
  value: :value
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ ReconciliationField

Returns a new instance of ReconciliationField.



24
25
26
27
28
29
30
31
32
# File 'lib/retab/consensus/reconciliation_field.rb', line 24

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @likelihood = hash[:likelihood]
  @path = hash[:path]
  @supporting_input_count = hash[:supporting_input_count]
  @total_input_count = hash[:total_input_count]
  @value = hash[:value]
end

Instance Attribute Details

#likelihoodObject

Returns the value of attribute likelihood.



16
17
18
# File 'lib/retab/consensus/reconciliation_field.rb', line 16

def likelihood
  @likelihood
end

#pathObject

Returns the value of attribute path.



16
17
18
# File 'lib/retab/consensus/reconciliation_field.rb', line 16

def path
  @path
end

#supporting_input_countObject

Returns the value of attribute supporting_input_count.



16
17
18
# File 'lib/retab/consensus/reconciliation_field.rb', line 16

def supporting_input_count
  @supporting_input_count
end

#total_input_countObject

Returns the value of attribute total_input_count.



16
17
18
# File 'lib/retab/consensus/reconciliation_field.rb', line 16

def total_input_count
  @total_input_count
end

#valueObject

Returns the value of attribute value.



16
17
18
# File 'lib/retab/consensus/reconciliation_field.rb', line 16

def value
  @value
end