Class: RecordDiff::ResultSet

Inherits:
Array
  • Object
show all
Defined in:
lib/record_diff/result_set.rb

Overview

Convenience wrapper for result array.

Instance Method Summary collapse

Constructor Details

#initialize(results) ⇒ ResultSet

Returns a new instance of ResultSet.



6
7
8
# File 'lib/record_diff/result_set.rb', line 6

def initialize(results)
  super results
end

Instance Method Details

#addedObject



18
19
20
# File 'lib/record_diff/result_set.rb', line 18

def added
  select(&:added?)
end

#allObject



30
31
32
# File 'lib/record_diff/result_set.rb', line 30

def all
  self
end

#changedObject



14
15
16
# File 'lib/record_diff/result_set.rb', line 14

def changed
  select(&:changed?)
end

#droppedObject



22
23
24
# File 'lib/record_diff/result_set.rb', line 22

def dropped
  select(&:dropped?)
end

#erroredObject



26
27
28
# File 'lib/record_diff/result_set.rb', line 26

def errored
  select(&:error?)
end

#unchangedObject



10
11
12
# File 'lib/record_diff/result_set.rb', line 10

def unchanged
  select(&:unchanged?)
end