Class: Wildfire::Converter::Manager

Inherits:
Core
  • Object
show all
Defined in:
lib/wildfire/converter/manager.rb

Constant Summary

Constants inherited from Core

Core::RED

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Core

#generate_path, #quick_save, #save, #temp_mat

Constructor Details

#initialize(full_path) ⇒ Manager

Returns a new instance of Manager.



6
7
8
9
10
# File 'lib/wildfire/converter/manager.rb', line 6

def initialize(full_path)
  @full_path = full_path
  @page_cutter = PageCutter.new(full)
  @screens = []
end

Instance Attribute Details

#screensObject (readonly)

Returns the value of attribute screens.



4
5
6
# File 'lib/wildfire/converter/manager.rb', line 4

def screens
  @screens
end

Instance Method Details

#converted_pathObject



25
26
27
# File 'lib/wildfire/converter/manager.rb', line 25

def converted_path
  generate_path('converted.jpg')
end

#cut_page!(coords) ⇒ Object



16
17
18
19
# File 'lib/wildfire/converter/manager.rb', line 16

def cut_page!(coords)
  page = @page_cutter.cut_page(coords)
  save('big_page.jpg', page)
end

#predicted_page_coordsObject



12
13
14
# File 'lib/wildfire/converter/manager.rb', line 12

def predicted_page_coords
  @page_cutter.small_coords
end

#small_full_pathObject



21
22
23
# File 'lib/wildfire/converter/manager.rb', line 21

def small_full_path
  save('small_full.jpg', small)
end