Sha256: 0d0bab5cca34da4e08c50cae69b54f5ae6f5af2df8078ec6ade5538065baeac0

Contents?: true

Size: 628 Bytes

Versions: 1

Compression:

Stored size: 628 Bytes

Contents

# frozen_string_literal: true
require_relative 'indexes_generator'
module KCommercial
  module Resources
    class FontsIndexesGenerator < IndexesGenerator
      private
      def indexes_filename
        'fonts'
      end

      def index_resources
        hash = super
        asset_objects.each do |asset|
          hash[asset.name] = asset.trait_rows.map do |row|
            row_hash = {}
            if row.traits.count > 0
              row_hash[:traits] = row.traits
            end
            row_hash[:resource] = row.resource
            row_hash
          end
        end
        hash
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
KCommercialPipeline-0.2.5.1 lib/KCommercialPipeline/core/resource/bundle/fonts_generator.rb