Module: EppoClient
- Defined in:
- lib/eppo_client.rb,
lib/eppo_client/client.rb,
lib/eppo_client/config.rb,
lib/eppo_client/version.rb,
lib/eppo_client/validation.rb,
lib/eppo_client/custom_errors.rb,
lib/eppo_client/assignment_logger.rb
Overview
The helper module to validate keys
Defined Under Namespace
Classes: AssignmentLogger, AssignmentLoggerError, Client, Config, InvalidValueError
Constant Summary collapse
- VERSION =
"3.7.1"
Class Method Summary collapse
-
.init(config) ⇒ EppoClient::Client
Initializes the Eppo client singleton.
- .validate_not_blank(field_name, field_value) ⇒ Object
Class Method Details
.init(config) ⇒ EppoClient::Client
Note:
The client returned by this method may still be in the process of initializing. Use the ‘#wait_for_initialization` method to wait for the client to be ready.
Initializes the Eppo client singleton.
17 18 19 20 |
# File 'lib/eppo_client.rb', line 17 def init(config) client = EppoClient::Client.instance client.init(config) end |
.validate_not_blank(field_name, field_value) ⇒ Object
9 10 11 12 13 |
# File 'lib/eppo_client/validation.rb', line 9 def validate_not_blank(field_name, field_value) (field_value.nil? || field_value == "") && raise( EppoClient::InvalidValueError, "#{field_name} cannot be blank" ) end |