Class: CcipDirectoryAndConfigurationRestApiV1::Environment3
- Inherits:
-
Object
- Object
- CcipDirectoryAndConfigurationRestApiV1::Environment3
- Defined in:
- lib/ccip_directory_and_configuration_rest_api_v1/models/environment3.rb
Overview
environment3.
Constant Summary collapse
- ENVIRONMENT3 =
[ # TODO: Write general description for MAINNET MAINNET = 'mainnet'.freeze, # TODO: Write general description for TESTNET TESTNET = 'testnet'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = MAINNET) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/ccip_directory_and_configuration_rest_api_v1/models/environment3.rb', line 23 def self.from_value(value, default_value = MAINNET) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'mainnet' then MAINNET when 'testnet' then TESTNET else default_value end end |
.validate(value) ⇒ Object
17 18 19 20 21 |
# File 'lib/ccip_directory_and_configuration_rest_api_v1/models/environment3.rb', line 17 def self.validate(value) return false if value.nil? ENVIRONMENT3.include?(value) end |