Class: NcsNavigator::Mdes::Differences::Collection

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/ncs_navigator/mdes/differences/collection.rb

Overview

Captures the differences between two collections.

Instance Method Summary collapse

Constructor Details

#initialize(left_only, right_only, entry_differences) ⇒ Collection

Returns a new instance of Collection.



12
13
14
15
16
# File 'lib/ncs_navigator/mdes/differences/collection.rb', line 12

def initialize(left_only, right_only, entry_differences)
  @left_only = left_only
  @right_only = right_only
  @entry_differences = entry_differences
end

Instance Method Details

#entry_differencesHash<Object, Entry>

Detailed differences for entries which are present in some form in each collection. Keys are the characteristic (alignment) value for the entry.

Returns:



43
44
45
# File 'lib/ncs_navigator/mdes/differences/collection.rb', line 43

def entry_differences
  @entry_differences ||= {}
end

#left_onlyArray<Object>

A list of those entries which are in the lefthand version of the collection only. Values are the characteristic (alignment) value for each entry.

Returns:

  • (Array<Object>)


24
25
26
# File 'lib/ncs_navigator/mdes/differences/collection.rb', line 24

def left_only
  @left_only ||= []
end

#right_onlyArray<Object>

A list of those entries which are in the righthand version of the collection only. Values are the characteristic (alignment) value for each entry.

Returns:

  • (Array<Object>)


34
35
36
# File 'lib/ncs_navigator/mdes/differences/collection.rb', line 34

def right_only
  @right_only ||= []
end