Module: FlightConfig::HasIndices::ClassMethods

Defined in:
lib/flight_config/has_indices.rb

Instance Method Summary collapse

Instance Method Details

#has_indices(klass, &b) ⇒ Object



35
36
37
38
# File 'lib/flight_config/has_indices.rb', line 35

def has_indices(klass, &b)
  @indices ||= []
  @indices << [klass, b]
end

#indicesObject



40
41
42
43
44
# File 'lib/flight_config/has_indices.rb', line 40

def indices
  @indices ||= []
  base = (defined?(super) ? super : [])
  [*base, *@indices]
end