Class: Relix::IndexSet::Obsolater

Inherits:
Object
  • Object
show all
Defined in:
lib/relix/index_set.rb

Instance Method Summary collapse

Constructor Details

#initialize(index_set) ⇒ Obsolater

Returns a new instance of Obsolater.



56
57
58
# File 'lib/relix/index_set.rb', line 56

def initialize(index_set)
  @index_set = index_set
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *args) ⇒ Object



60
61
62
63
64
65
66
# File 'lib/relix/index_set.rb', line 60

def method_missing(m, *args)
  if Relix.index_types.keys.include?(m.to_sym)
    @index_set.add_obsolete_index(m, *args)
  else
    raise ArgumentError.new("Unknown index type #{m}.")
  end
end