Class: PdfMatcher::PdfFile::File

Inherits:
Base
  • Object
show all
Defined in:
lib/pdf_matcher/pdf_file.rb

Instance Attribute Summary

Attributes inherited from Base

#path

Instance Method Summary collapse

Methods inherited from Base

#close, #open

Constructor Details

#initialize(path) ⇒ File

Returns a new instance of File.



38
39
40
# File 'lib/pdf_matcher/pdf_file.rb', line 38

def initialize(path)
  super(data: nil, path: Pathname(path))
end

Instance Method Details

#dataObject



42
43
44
# File 'lib/pdf_matcher/pdf_file.rb', line 42

def data
  @data ||= path.binread
end