Class: TRMNLP::ScreenGenerator
- Inherits:
-
Object
- Object
- TRMNLP::ScreenGenerator
- Defined in:
- lib/trmnlp/screen_generator.rb
Defined Under Namespace
Classes: BrowserPool
Constant Summary collapse
- @@browser_pool =
Class-level browser pool shared across all instances
BrowserPool.new
Instance Attribute Summary collapse
-
#image ⇒ Object
Returns the value of attribute image.
-
#img_path ⇒ Object
Returns the value of attribute img_path.
-
#input ⇒ Object
Returns the value of attribute input.
-
#output ⇒ Object
Returns the value of attribute output.
-
#processor ⇒ Object
Returns the value of attribute processor.
Instance Method Summary collapse
-
#initialize(html, opts = {}) ⇒ ScreenGenerator
constructor
A new instance of ScreenGenerator.
- #process ⇒ Object
Constructor Details
#initialize(html, opts = {}) ⇒ ScreenGenerator
Returns a new instance of ScreenGenerator.
103 104 105 106 |
# File 'lib/trmnlp/screen_generator.rb', line 103 def initialize(html, opts = {}) self.input = html self.image = !!opts[:image] end |
Instance Attribute Details
#image ⇒ Object
Returns the value of attribute image.
108 109 110 |
# File 'lib/trmnlp/screen_generator.rb', line 108 def image @image end |
#img_path ⇒ Object
Returns the value of attribute img_path.
108 109 110 |
# File 'lib/trmnlp/screen_generator.rb', line 108 def img_path @img_path end |
#input ⇒ Object
Returns the value of attribute input.
108 109 110 |
# File 'lib/trmnlp/screen_generator.rb', line 108 def input @input end |
#output ⇒ Object
Returns the value of attribute output.
108 109 110 |
# File 'lib/trmnlp/screen_generator.rb', line 108 def output @output end |
#processor ⇒ Object
Returns the value of attribute processor.
108 109 110 |
# File 'lib/trmnlp/screen_generator.rb', line 108 def processor @processor end |
Instance Method Details
#process ⇒ Object
110 111 112 113 114 |
# File 'lib/trmnlp/screen_generator.rb', line 110 def process convert_to_image image ? mono_image(output) : mono(output) output end |