Class: Indexers::Dsl::Serialization

Inherits:
Traitable show all
Defined in:
lib/indexers/dsl/serialization.rb

Instance Method Summary collapse

Methods inherited from Traitable

#initialize, #method_missing, #traits

Methods inherited from Api

#initialize, #method_missing, #to_h

Constructor Details

This class inherits a constructor from Indexers::Dsl::Traitable

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Indexers::Dsl::Traitable

Instance Method Details

#extract(record, *names) ⇒ Object



5
6
7
8
9
# File 'lib/indexers/dsl/serialization.rb', line 5

def extract(record, *names)
  names.each do |name|
    send name, record.send(name)
  end
end

#transliterate(value) ⇒ Object



11
12
13
# File 'lib/indexers/dsl/serialization.rb', line 11

def transliterate(value)
  ActiveSupport::Inflector.transliterate value
end