lib/etl/control/source.rb in activewarehouse-etl-0.4.0 vs lib/etl/control/source.rb in activewarehouse-etl-0.5.0

- old
+ new

@@ -1,13 +1,24 @@ module ETL #:nodoc: module Control #:nodoc: # ETL source. Subclasses must implement the <tt>each</tt> method. class Source include Enumerable - attr_accessor :control, :configuration, :definition + # The control object + attr_accessor :control + + # The configuration Hash + attr_accessor :configuration + + # The definition Hash + attr_accessor :definition + class << self + # Convert the name to a Source class. + # + # For example if name is :database then this will return a DatabaseSource class def class_for_name(name) ETL::Control.const_get("#{name.to_s.classify}Source") end end @@ -17,9 +28,13 @@ # * <tt>definition</tt>: The source layout definition def initialize(control, configuration, definition) @control = control @configuration = configuration @definition = definition + end + + def errors + @errors ||= [] end end end end \ No newline at end of file