Sha256: 465257bc9f7016e0d78e5c6661d4d1c4ca5cfef258a443a525be52eaf9c38a1d

Contents?: true

Size: 490 Bytes

Versions: 5

Compression:

Stored size: 490 Bytes

Contents

# frozen_string_literal: true

require 'forwardable'

module PdfMatcher
  class MatchResult < Struct.new(:matched, :pdf1_file, :pdf2_file, :diff_pdf_path)
    extend Forwardable

    alias :matched? :matched

    def_delegator :pdf1_file, :path, :pdf1_path
    def_delegator :pdf1_file, :data, :pdf1_data
    def_delegator :pdf2_file, :path, :pdf2_path
    def_delegator :pdf2_file, :data, :pdf2_data

    def diff_pdf_data
      @diff_pdf_data ||= diff_pdf_path&.binread
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pdf_matcher-2.2.0 lib/pdf_matcher/match_result.rb
pdf_matcher-2.1.0 lib/pdf_matcher/match_result.rb
pdf_matcher-2.0.0 lib/pdf_matcher/match_result.rb
pdf_matcher-1.0.1 lib/pdf_matcher/match_result.rb
pdf_matcher-1.0.0 lib/pdf_matcher/match_result.rb