Class: MistApi::Server
- Inherits:
-
Object
- Object
- MistApi::Server
- Defined in:
- lib/mist_api/configuration.rb
Overview
An enum for API servers.
Constant Summary collapse
- SERVER =
[ API_HOST = 'API Host'.freeze ].freeze
Class Method Summary collapse
-
.from_value(value, default_value = API_HOST) ⇒ Object
Converts a string or symbol into a valid Server constant.
Class Method Details
.from_value(value, default_value = API_HOST) ⇒ Object
Converts a string or symbol into a valid Server constant.
57 58 59 60 61 |
# File 'lib/mist_api/configuration.rb', line 57 def self.from_value(value, default_value = API_HOST) return default_value if value.nil? default_value end |