Module: EndpointSecurity::Diagnostics
- Defined in:
- lib/endpoint_security/diagnostics.rb
Overview
Turns native client creation results into actionable messages.
Constant Summary collapse
- EXPLANATIONS =
Human-readable explanations keyed by native result.
{ success: "Endpoint Security client created successfully.", err_invalid_argument: "Endpoint Security rejected an invalid argument; this is likely a binding bug.", err_internal: "Endpoint Security reported an internal error; retry after checking system logs.", err_not_entitled: "The host Ruby executable lacks the Endpoint Security client entitlement.", err_not_permitted: "Grant Full Disk Access to the host Ruby executable.", err_not_privileged: "Run the signed host Ruby executable as root.", err_too_many_clients: "Close another Endpoint Security client and retry." }.freeze
Class Method Summary collapse
-
.explain(result) ⇒ String
Explanation for
result.
Class Method Details
.explain(result) ⇒ String
Returns explanation for result.
20 21 22 23 24 |
# File 'lib/endpoint_security/diagnostics.rb', line 20 def explain(result) EXPLANATIONS.fetch(result.respond_to?(:to_sym) ? result.to_sym : result) do "Unknown es_new_client result: #{result.inspect}." end end |