Module: ReactEmailRails::RenderProtocol
- Extended by:
- RenderProtocol
- Included in:
- RenderProtocol
- Defined in:
- lib/react_email_rails/render_protocol.rb
Instance Method Summary collapse
- #compatible_metadata?(body) ⇒ Boolean
- #compatible_response?(body) ⇒ Boolean
- #mismatch_message(body) ⇒ Object
Instance Method Details
#compatible_metadata?(body) ⇒ Boolean
11 12 13 14 |
# File 'lib/react_email_rails/render_protocol.rb', line 11 def (body) body["protocolVersion"] == RENDER_PROTOCOL_VERSION && body["packageVersion"] == VERSION end |
#compatible_response?(body) ⇒ Boolean
7 8 9 |
# File 'lib/react_email_rails/render_protocol.rb', line 7 def compatible_response?(body) body["ok"] == true && (body) end |
#mismatch_message(body) ⇒ Object
16 17 18 19 |
# File 'lib/react_email_rails/render_protocol.rb', line 16 def (body) "renderer version mismatch: expected react-email-rails #{VERSION} protocol #{RENDER_PROTOCOL_VERSION}, " \ "got package #{body["packageVersion"].inspect} protocol #{body["protocolVersion"].inspect}" end |