Class: Pokotarou::RegistrationConfigMaker::ModelOptionSetter

Inherits:
Object
  • Object
show all
Defined in:
lib/pokotarou/registration_config_maker/model_option_setter.rb

Class Method Summary collapse

Class Method Details

.set(acc, block_content) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/pokotarou/registration_config_maker/model_option_setter.rb', line 5

def set acc, block_content
  block_name = block_content.first
  block_config = block_content.second
  acc[block_name] = {}
    
  block_config.each do |model_content|
    model_name = model_content.first
    model_config = model_content.second
    set_column_type(model_config, model_name)
    acc[block_name][model_name] = model_config
  end
end