Class: Lhm::Intersection

Inherits:
Object
  • Object
show all
Defined in:
lib/lhm/intersection.rb

Overview

Determine and format columns common to origin and destination.

Defined Under Namespace

Modules: Joiners

Instance Method Summary collapse

Constructor Details

#initialize(origin, destination, renames = {}) ⇒ Intersection

Returns a new instance of Intersection.



7
8
9
10
11
# File 'lib/lhm/intersection.rb', line 7

def initialize(origin, destination, renames = {})
  @origin = origin
  @destination = destination
  @renames = renames
end

Instance Method Details

#destinationObject



17
18
19
# File 'lib/lhm/intersection.rb', line 17

def destination
  (common + @renames.values).extend(Joiners)
end

#originObject



13
14
15
# File 'lib/lhm/intersection.rb', line 13

def origin
  (common + @renames.keys).extend(Joiners)
end