lib/xcres/analyzer/resources_analyzer/xcassets_analyzer.rb
# Build a section for a asset catalog
#
# @param  [XCAssets::Bundle] xcassets_bundle
#         the file reference to the resources bundle file
#
# @return [Section]
#         a section or nil
#
Build a section for a asset catalog
Build a section for a asset catalog
def build_section_for_xcassets bundle
        log "Found asset catalog %s with #%s image files.",
          bundle.path.basename, bundle.resources.count
        section_name = "#{basename_without_ext(bundle.path)}Assets"
        section_data = build_images_section_data(bundle.resources.map(&:path), {
          use_basename:     [:path],
          path_without_ext: true
        })
        new_section(section_name, section_data)
      end
def build_section_for_xcassets bundle log "Found asset catalog %s with #%s image files." , bundle . path . basename , bundle . resources . count section_name = "#{basename_without_ext(bundle.path)}Assets" section_data = build_images_section_data ( bundle . resources . map ( & :path ) , { use_basename : [ :path ] , path_without_ext : true } ) new_section ( section_name , section_data ) end
Build a section for a asset catalog
Build a section for a asset catalog
a section or nil
a section or nil
Section
bundle
xcassets_bundle the file reference to the resources bundle file
xcassets_bundle the file reference to the resources bundle file