Class: CocoaDepot::Component
- Inherits:
-
Object
- Object
- CocoaDepot::Component
- Defined in:
- lib/KCommercialPipeline/core/resource/i18n/bundle_generator.rb
Overview
The abstract for the container that contains a component. In cocoa it may be a pod.
Instance Method Summary collapse
- #auto_compoment_list ⇒ Object
-
#check_auto_compoment! ⇒ Object
Check the aim bundle is exist or not.
Instance Method Details
#auto_compoment_list ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/KCommercialPipeline/core/resource/i18n/bundle_generator.rb', line 22 def auto_compoment_list auto_assets_generation_path.mkdir unless auto_assets_generation_path.exist? all_component_resource_paths = auto_assets_generation_path.children.select(&:directory?) components = all_component_resource_paths.map do |c| bundle_name = auto_bundle_name app_id = c.basename component_name = "#{bundle_name}#{app_id.to_s.camelize}" component_name end components end |
#check_auto_compoment! ⇒ Object
Check the aim bundle is exist or not
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/KCommercialPipeline/core/resource/i18n/bundle_generator.rb', line 9 def check_auto_compoment! all_component_resource_paths = auto_assets_generation_path.children.select(&:directory?) all_component_resource_paths.each do |child| app_id = child.basename bundle_name = auto_bundle_name component_name = "#{bundle_name}#{app_id.to_s.camelize}" lib = KCommercial::Resources::LibBundleGenerator.new(component_name, auto_bundle_name, child) lib.generate! end # rm assets FileUtils.rm_rf(auto_assets_generation_path) end |