Sha256: 5d20d8d6dc4829caf52a1ddb291304573f650ea6edcd2878c4a9524721b8c3e9

Contents?: true

Size: 619 Bytes

Versions: 49

Compression:

Stored size: 619 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)
            patterns.lazy.map { |pattern| pattern.to_parser.parse(path.to_path) }
              .find(&:present?).if_present { |v| yield(v) }
          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

49 entries across 49 versions & 2 rubygems

Version Path
eac_tools-0.63.0 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.62.1 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.62.0 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.61.1 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.61.0 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.60.3 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.60.2 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.60.1 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.60.0 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.59.0 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.58.0 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.57.0 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.56.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.0 lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.56.0 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.55.7 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.55.6 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
avm-eac_generic_base0-0.11.0 lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.55.5 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb
eac_tools-0.55.4 sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base/file_resource_name_helper.rb