Class: Indexes::Dsl::Serialization
- Defined in:
- lib/indexes/dsl/serialization.rb
Instance Method Summary collapse
Methods inherited from Api
#initialize, #method_missing, #to_h
Constructor Details
This class inherits a constructor from Indexes::Dsl::Api
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Indexes::Dsl::Api
Instance Method Details
#extract(record, *names) ⇒ Object
5 6 7 8 9 |
# File 'lib/indexes/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/indexes/dsl/serialization.rb', line 11 def transliterate(value) ActiveSupport::Inflector.transliterate value end |