lib/arc-furnace/abstract_join.rb in arc-furnace-0.1.3 vs lib/arc-furnace/abstract_join.rb in arc-furnace-0.1.4

- old
+ new

@@ -1,11 +1,10 @@ require 'arc-furnace/source' module ArcFurnace class AbstractJoin < Source private_attr_reader :hash, :source, :key_column - attr_reader :value # The source is a source, the hash is a hash, and one can optionally # pass the key column to get the primary key for each source entity, the # default is equijoin semantics--the key of the hash is used. def initialize(source: , hash:, key_column: nil) @@ -16,12 +15,16 @@ else raise 'Must be passed one Hash and one Source!' end end - def prepare - advance + def value + if @value.nil? && !empty? + advance + end + @value end + def advance raise "Unimplemented!" end