YAML in Rails
# any.rb YAML.load_file("config/company_categories.yml").fetch(:lv1).map { |cat_hash| OpenStruct.new(cat_hash) }
# config/company_categories.yml :lv1: - :id: ap :name: Animals & Pet Supplies - :id: aa :name: Apparel & Accessories
# any.rb YAML.load_file("config/company_categories.yml").fetch(:lv1).map { |cat_hash| OpenStruct.new(cat_hash) }
# config/company_categories.yml :lv1: - :id: ap :name: Animals & Pet Supplies - :id: aa :name: Apparel & Accessories