Class: YDIM::Reconciler::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/ydim/reconciler.rb

Overview

What a reconciliation run found, including the entries that never made it as far as matching -- silently dropping those would make the report look like it had seen everything.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeResult

Returns a new instance of Result.



75
76
77
78
# File 'lib/ydim/reconciler.rb', line 75

def initialize
  @matches = []
  @skipped = Hash.new(0)
end

Instance Attribute Details

#matchesObject (readonly)

Returns the value of attribute matches.



74
75
76
# File 'lib/ydim/reconciler.rb', line 74

def matches
  @matches
end

#skippedObject (readonly)

Returns the value of attribute skipped.



74
75
76
# File 'lib/ydim/reconciler.rb', line 74

def skipped
  @skipped
end

Instance Method Details

#applicableObject



79
80
81
# File 'lib/ydim/reconciler.rb', line 79

def applicable
  @matches.select { |match| match.applicable? }
end

#appliedObject



88
89
90
# File 'lib/ydim/reconciler.rb', line 88

def applied
  @matches.select { |match| match.applied? }
end

#reviewObject



82
83
84
# File 'lib/ydim/reconciler.rb', line 82

def review
  @matches.select { |match| match.review? }
end

#unmatchedObject



85
86
87
# File 'lib/ydim/reconciler.rb', line 85

def unmatched
  @matches.select { |match| match.state == :unmatched }
end