Class: WalmartApIs::Server
- Inherits:
-
Object
- Object
- WalmartApIs::Server
- Defined in:
- lib/walmart_ap_is/configuration.rb
Overview
An enum for API servers.
Constant Summary collapse
- SERVER =
[ SERVER_1 = 'Server 1'.freeze ].freeze
Class Method Summary collapse
-
.from_value(value, default_value = SERVER_1) ⇒ Object
Converts a string or symbol into a valid Server constant.
Class Method Details
.from_value(value, default_value = SERVER_1) ⇒ Object
Converts a string or symbol into a valid Server constant.
28 29 30 31 32 |
# File 'lib/walmart_ap_is/configuration.rb', line 28 def self.from_value(value, default_value = SERVER_1) return default_value if value.nil? default_value end |