Class: Bootybox::ElementsConfigService
- Inherits:
-
Object
- Object
- Bootybox::ElementsConfigService
- Defined in:
- app/services/bootybox/elements_config_service.rb
Overview
This class does all things related to elements and the config file
Instance Method Summary collapse
- #source_elements_data ⇒ Object
- #source_elements_file ⇒ Object
- #source_elements_name ⇒ Object
- #target_element_file ⇒ Object
Instance Method Details
#source_elements_data ⇒ Object
13 14 15 |
# File 'app/services/bootybox/elements_config_service.rb', line 13 def source_elements_data YAML::load(File.open(source_elements_file).read) end |
#source_elements_file ⇒ Object
9 10 11 |
# File 'app/services/bootybox/elements_config_service.rb', line 9 def source_elements_file File.("../../../../config/elements.yml", __FILE__) end |
#source_elements_name ⇒ Object
17 18 19 |
# File 'app/services/bootybox/elements_config_service.rb', line 17 def source_elements_name source_elements_data.map {|s| s['name'] } end |
#target_element_file ⇒ Object
4 5 6 |
# File 'app/services/bootybox/elements_config_service.rb', line 4 def target_element_file File.join(Rails.root, "config/alchemy/elements.yml") end |