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?(object) ⇒ Boolean
- .image_to_tif(source, x = nil, y = nil, w = nil, h = nil) ⇒ Object
- .need_crop?(x = nil, y = nil, w = nil, h = nil) ⇒ 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?(object) ⇒ Boolean
24 25 |
# File 'lib/processors/none.rb', line 24 def self.image?(object) 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(self.read_with_processor(source)) tmp_file end |
.need_crop?(x = nil, y = nil, w = nil, h = nil) ⇒ Boolean
17 18 |
# File 'lib/processors/none.rb', line 17 def self.need_crop?(x = nil, y = nil, w = nil, h = nil) 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 |