Class: HTMLRender::RenderBatches::HTTPRenderBatch
- Inherits:
-
Object
- Object
- HTMLRender::RenderBatches::HTTPRenderBatch
- Defined in:
- lib/html_render/render_batches.rb
Instance Attribute Summary collapse
-
#servers ⇒ Object
readonly
Returns the value of attribute servers.
Instance Method Summary collapse
-
#initialize(servers) ⇒ HTTPRenderBatch
constructor
servers: Hash of (String) key to (String) URL to pass to HTTPRenderer. -
#render_html_to_directory(html, directory) ⇒ Object
html: HTML to renderdirectory: Directory in which to dump PNG files (one per server).
Constructor Details
#initialize(servers) ⇒ HTTPRenderBatch
servers: Hash of (String) key to (String) URL to pass to
HTTPRenderer
10 11 12 |
# File 'lib/html_render/render_batches.rb', line 10 def initialize(servers) @servers = servers end |
Instance Attribute Details
#servers ⇒ Object (readonly)
Returns the value of attribute servers.
6 7 8 |
# File 'lib/html_render/render_batches.rb', line 6 def servers @servers end |
Instance Method Details
#render_html_to_directory(html, directory) ⇒ Object
html: HTML to render directory: Directory in which to dump PNG files (one per server)
16 17 18 19 |
# File 'lib/html_render/render_batches.rb', line 16 def render_html_to_directory(html, directory) threads = create_threads(html, directory) threads.each { |t| t.join } end |