Class: ReactEmailRails::RenderModes::Subprocess
- Inherits:
-
Object
- Object
- ReactEmailRails::RenderModes::Subprocess
- Defined in:
- lib/react_email_rails/render_modes/subprocess.rb
Direct Known Subclasses
Defined Under Namespace
Classes: CommandRunner
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(payload:, label:, response: :email) ⇒ Subprocess
constructor
A new instance of Subprocess.
- #render ⇒ Object
Constructor Details
#initialize(payload:, label:, response: :email) ⇒ Subprocess
Returns a new instance of Subprocess.
11 12 13 14 15 |
# File 'lib/react_email_rails/render_modes/subprocess.rb', line 11 def initialize(payload:, label:, response: :email) @payload = payload @label = label @response = response end |
Class Method Details
.healthy?(command:, timeout:) ⇒ Boolean
3 4 5 6 7 8 |
# File 'lib/react_email_rails/render_modes/subprocess.rb', line 3 def healthy?(command:, timeout:) result = CommandRunner.capture([*command, "--health"], timeout:) ReactEmailRails::RenderProtocol.healthy_result?(result) rescue StandardError false end |
Instance Method Details
#render ⇒ Object
17 18 19 |
# File 'lib/react_email_rails/render_modes/subprocess.rb', line 17 def render run end |