Sha256: de6244dd950d2a2bc0724259bde80e2e044c0f1b331bccf7052646a7df7fee7d

Contents?: true

Size: 618 Bytes

Versions: 17

Compression:

Stored size: 618 Bytes

Contents

# frozen_string_literal: true

require 'eac_ruby_utils/core_ext'

module Avm
  module EacGenericBase0
    class FileFormats
      class Base < ::Avm::FileFormats::Base
        module FileResourceNameHelper
          def result_from_patterns(patterns, path, &block)
            patterns.lazy.map { |pattern| pattern.to_parser.parse(path.to_path) }
              .find(&:present?).if_present(&block)
          end

          def result_from_superclass(path)
            self.class.superclass.instance_method(:file_resource_name)
              .bind_call(self, path)
          end
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
avm-eac_generic_base0-0.14.0 lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.98.0 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
avm-eac_generic_base0-0.13.0 lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.87.0 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.84.2 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
avm-eac_generic_base0-0.12.2 lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.84.1 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.84.0 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.83.0 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.82.0 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.81.0 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.80.0 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.79.0 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.78.0 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.77.1 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
avm-eac_generic_base0-0.12.1 lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.77.0 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb