Module: FlightConfig::HasIndices

Defined in:
lib/flight_config/has_indices.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



30
31
32
# File 'lib/flight_config/has_indices.rb', line 30

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

#generate_indicesObject



47
48
49
50
51
# File 'lib/flight_config/has_indices.rb', line 47

def generate_indices
  self.class.indices.each do |klass, block|
    instance_exec(klass.method(:create_or_update), &block)
  end
end