Module: NoneProcessor
- Defined in:
- lib/processors/none.rb
Overview
Add to rtesseract a image without manipulation
Class Method Summary collapse
- .a_name?(name) ⇒ Boolean
- .image? ⇒ Boolean
- .image_to_tif(source, _x = nil, _y = nil, _w = nil, _h = nil) ⇒ Object
- .need_crop? ⇒ Boolean
- .read_with_processor(path) ⇒ Object
- .setup ⇒ Object
Class Method Details
.a_name?(name) ⇒ Boolean
7 8 9 |
# File 'lib/processors/none.rb', line 7 def self.a_name?(name) %w(none NoneProcessor).include?(name.to_s) end |
.image? ⇒ Boolean
24 25 |
# File 'lib/processors/none.rb', line 24 def self.image?(*) end |
.image_to_tif(source, _x = nil, _y = nil, _w = nil, _h = nil) ⇒ Object
11 12 13 14 15 |
# File 'lib/processors/none.rb', line 11 def self.image_to_tif(source, _x = nil, _y = nil, _w = nil, _h = nil) tmp_file = Tempfile.new(['', '.tif']) tmp_file.write(read_with_processor(source)) tmp_file end |
.need_crop? ⇒ Boolean
17 18 |
# File 'lib/processors/none.rb', line 17 def self.need_crop?(*) end |
.read_with_processor(path) ⇒ Object
20 21 22 |
# File 'lib/processors/none.rb', line 20 def self.read_with_processor(path) File.read(path) end |
.setup ⇒ Object
4 5 |
# File 'lib/processors/none.rb', line 4 def self.setup end |