Class: NcsNavigator::Mdes::Differences::Collection
- Inherits:
-
Object
- Object
- NcsNavigator::Mdes::Differences::Collection
- Extended by:
- Forwardable
- Defined in:
- lib/ncs_navigator/mdes/differences/collection.rb
Overview
Captures the differences between two collections.
Instance Method Summary collapse
-
#entry_differences ⇒ Hash<Object, Entry>
Detailed differences for entries which are present in some form in each collection.
-
#initialize(left_only, right_only, entry_differences) ⇒ Collection
constructor
A new instance of Collection.
-
#left_only ⇒ Array<Object>
A list of those entries which are in the lefthand version of the collection only.
-
#right_only ⇒ Array<Object>
A list of those entries which are in the righthand version of the collection only.
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_differences ⇒ Hash<Object, Entry>
Detailed differences for entries which are present in some form in each collection. Keys are the characteristic (alignment) value for the entry.
43 44 45 |
# File 'lib/ncs_navigator/mdes/differences/collection.rb', line 43 def entry_differences @entry_differences ||= {} end |
#left_only ⇒ Array<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.
24 25 26 |
# File 'lib/ncs_navigator/mdes/differences/collection.rb', line 24 def left_only @left_only ||= [] end |
#right_only ⇒ Array<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.
34 35 36 |
# File 'lib/ncs_navigator/mdes/differences/collection.rb', line 34 def right_only @right_only ||= [] end |