Module: ChgkRating::AttributeMappings

Extended by:
Utils::Transformations
Defined in:
lib/chgk_rating/attribute_mappings.rb

Constant Summary

Constants included from Utils::Transformations

Utils::Transformations::TRANSFORMERS

Class Method Summary collapse

Methods included from Utils::Transformations

load_transformers!, transformation

Class Method Details

.find(name) ⇒ Object


6
7
8
# File 'lib/chgk_rating/attribute_mappings.rb', line 6

def find(name)
  const_get name.snakecase_upcase
end

.generate_mappings_for(data) ⇒ Object


10
11
12
13
14
# File 'lib/chgk_rating/attribute_mappings.rb', line 10

def generate_mappings_for(data)
  data.each do |const_name, raw_schemes|
    const_set const_name, generate_mapping_for(raw_schemes)
  end
end