Class: Pocketbook::RenderRequest
- Inherits:
-
Object
- Object
- Pocketbook::RenderRequest
- Defined in:
- lib/pocketbook/render_request.rb
Instance Attribute Summary collapse
-
#debounce_ms ⇒ Object
readonly
Returns the value of attribute debounce_ms.
-
#diagnostics ⇒ Object
readonly
Returns the value of attribute diagnostics.
-
#inputs ⇒ Object
readonly
Returns the value of attribute inputs.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#open_output ⇒ Object
readonly
Returns the value of attribute open_output.
-
#output_path ⇒ Object
readonly
Returns the value of attribute output_path.
-
#style ⇒ Object
readonly
Returns the value of attribute style.
-
#template_override ⇒ Object
readonly
Returns the value of attribute template_override.
-
#theme_path ⇒ Object
readonly
Returns the value of attribute theme_path.
Instance Method Summary collapse
-
#initialize(inputs:, theme_path:, style: nil, template_override: nil, output_path:, metadata: {}, debounce_ms: 350, diagnostics: false, open_output: false) ⇒ RenderRequest
constructor
A new instance of RenderRequest.
Constructor Details
#initialize(inputs:, theme_path:, style: nil, template_override: nil, output_path:, metadata: {}, debounce_ms: 350, diagnostics: false, open_output: false) ⇒ RenderRequest
Returns a new instance of RenderRequest.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/pocketbook/render_request.rb', line 5 def initialize( inputs:, theme_path:, style: nil, template_override: nil, output_path:, metadata: {}, debounce_ms: 350, diagnostics: false, open_output: false ) @inputs = normalize_inputs(inputs) @theme_path = normalize_required_string(theme_path, "theme_path") @style = normalize_optional_string(style) @template_override = normalize_optional_string(template_override) @output_path = normalize_required_string(output_path, "output_path") @metadata = symbolize_keys( || {}).freeze @debounce_ms = normalize_debounce_ms(debounce_ms) @diagnostics = !!diagnostics @open_output = !!open_output freeze end |
Instance Attribute Details
#debounce_ms ⇒ Object (readonly)
Returns the value of attribute debounce_ms.
3 4 5 |
# File 'lib/pocketbook/render_request.rb', line 3 def debounce_ms @debounce_ms end |
#diagnostics ⇒ Object (readonly)
Returns the value of attribute diagnostics.
3 4 5 |
# File 'lib/pocketbook/render_request.rb', line 3 def diagnostics @diagnostics end |
#inputs ⇒ Object (readonly)
Returns the value of attribute inputs.
3 4 5 |
# File 'lib/pocketbook/render_request.rb', line 3 def inputs @inputs end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
3 4 5 |
# File 'lib/pocketbook/render_request.rb', line 3 def @metadata end |
#open_output ⇒ Object (readonly)
Returns the value of attribute open_output.
3 4 5 |
# File 'lib/pocketbook/render_request.rb', line 3 def open_output @open_output end |
#output_path ⇒ Object (readonly)
Returns the value of attribute output_path.
3 4 5 |
# File 'lib/pocketbook/render_request.rb', line 3 def output_path @output_path end |
#style ⇒ Object (readonly)
Returns the value of attribute style.
3 4 5 |
# File 'lib/pocketbook/render_request.rb', line 3 def style @style end |
#template_override ⇒ Object (readonly)
Returns the value of attribute template_override.
3 4 5 |
# File 'lib/pocketbook/render_request.rb', line 3 def template_override @template_override end |
#theme_path ⇒ Object (readonly)
Returns the value of attribute theme_path.
3 4 5 |
# File 'lib/pocketbook/render_request.rb', line 3 def theme_path @theme_path end |