Class: ActiveSchema::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/active_schema/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



7
8
9
10
11
12
13
14
15
16
# File 'lib/active_schema/configuration.rb', line 7

def initialize
  self.feeder = OnTheFlyFeeder.new(self)
  self.skip_validation_for_column = proc {|column|
    column.name =~ /^(((created|updated)_(at|on))|position)$/
  }
  self.skip_model = proc {|model|
    model == ::ActiveRecord::Base ||
      (model.respond_to?(:abstract_class?) && model.abstract_class?)
  }
end

Instance Attribute Details

#feederObject

Returns the value of attribute feeder.



3
4
5
# File 'lib/active_schema/configuration.rb', line 3

def feeder
  @feeder
end

#skip_modelObject

Returns the value of attribute skip_model.



3
4
5
# File 'lib/active_schema/configuration.rb', line 3

def skip_model
  @skip_model
end

#skip_validation_for_columnObject

Returns the value of attribute skip_validation_for_column.



3
4
5
# File 'lib/active_schema/configuration.rb', line 3

def skip_validation_for_column
  @skip_validation_for_column
end