Class: SimpleTextExtract::TempfileExtractor

Inherits:
TextExtractor show all
Defined in:
lib/simple_text_extract/tempfile_extractor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from TextExtractor

call, #extract

Constructor Details

#initialize(filename:, raw:) ⇒ TempfileExtractor

Returns a new instance of TempfileExtractor.



7
8
9
10
11
12
# File 'lib/simple_text_extract/tempfile_extractor.rb', line 7

def initialize(filename:, raw:)
  @filename = filename
  @raw = String.new(raw, encoding: Encoding::UTF_8)

  write_raw
end

Instance Attribute Details

#filename ⇒ Object (readonly)

Returns the value of attribute filename.



5
6
7
# File 'lib/simple_text_extract/tempfile_extractor.rb', line 5

def filename
  @filename
end

#raw ⇒ Object (readonly)

Returns the value of attribute raw.



5
6
7
# File 'lib/simple_text_extract/tempfile_extractor.rb', line 5

def raw
  @raw
end