Class: Retab::ConditionEvaluationPerItem

Inherits:
Types::BaseModel show all
Defined in:
lib/retab/workflow_artifacts/condition_evaluation_per_item.rb

Constant Summary collapse

HASH_ATTRS =
{
  index: :index,
  indices: :indices,
  actual: :actual,
  matched: :matched
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

#inspect, normalize, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ ConditionEvaluationPerItem

Returns a new instance of ConditionEvaluationPerItem.



21
22
23
24
25
26
27
# File 'lib/retab/workflow_artifacts/condition_evaluation_per_item.rb', line 21

def initialize(json)
  hash = self.class.normalize(json)
  @index = hash[:index]
  @indices = (hash[:indices] || [])
  @actual = hash[:actual]
  @matched = hash[:matched]
end

Instance Attribute Details

#actualObject

Returns the value of attribute actual.



15
16
17
# File 'lib/retab/workflow_artifacts/condition_evaluation_per_item.rb', line 15

def actual
  @actual
end

#indexObject

Returns the value of attribute index.



15
16
17
# File 'lib/retab/workflow_artifacts/condition_evaluation_per_item.rb', line 15

def index
  @index
end

#indicesObject

Returns the value of attribute indices.



15
16
17
# File 'lib/retab/workflow_artifacts/condition_evaluation_per_item.rb', line 15

def indices
  @indices
end

#matchedObject

Returns the value of attribute matched.



15
16
17
# File 'lib/retab/workflow_artifacts/condition_evaluation_per_item.rb', line 15

def matched
  @matched
end