Class: Pokotarou::RegistrationConfigMaker::Main

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

Class Method Summary collapse

Class Method Details

.gen(all_content) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/pokotarou/registration_config_maker/main.rb', line 12

def gen all_content
  set_header_config(all_content)
  all_content.reduce({}) do |acc, block_content|
    block_name = block_content.first
    block_config = block_content.second
  
    if ConfigDomain.is_dush_syntax?(block_name.to_s)
      acc[block_name] = block_config
    else
      set_model_config_to_acc(acc, block_content)
    end
  
    acc
  end
end