class Configuration attr_accessor :excluded_models, :output_path, :comparison_level DEFAULT_COMPARISON_LEVEL = 1 COMPARISON_LEVELS = { 1 => :quick, 2 => :novice, 3 => :extensive, 4 => :full } def initialize(excluded_models: [], output_path: "db_mirrored", comparison_level: DEFAULT_COMPARISON_LEVEL) self.excluded_models = excluded_models self.output_path = output_path self.comparison_level = COMPARISON_LEVELS[comparison_level] || DEFAULT_COMPARISON_LEVEL end def valid_attributes! if !excluded_models.is_a?(Array) raise("Invalid excluded_models value! Was expecting an array") end if !output_path.present? raise("Invalid output_path value! Expected non empty string") end if COMPARISON_LEVELS.invert[comparison_level].nil? raise("Invalid comparison_level value! Expected a value between 1-4") end end def from_hash(hash_object) end end