Class: MistApi::EventFastroamTypeEnum
- Inherits:
-
Object
- Object
- MistApi::EventFastroamTypeEnum
- Defined in:
- lib/mist_api/models/event_fastroam_type_enum.rb
Overview
enum: ‘fail`, `none`, `pingpong`, `poor`, `slow`, `success`
Constant Summary collapse
- EVENT_FASTROAM_TYPE_ENUM =
[ # TODO: Write general description for FAIL FAIL = 'fail'.freeze, # TODO: Write general description for NONE NONE = 'none'.freeze, # TODO: Write general description for PINGPONG PINGPONG = 'pingpong'.freeze, # TODO: Write general description for POOR POOR = 'poor'.freeze, # TODO: Write general description for SLOW SLOW = 'slow'.freeze, # TODO: Write general description for SUCCESS SUCCESS = 'success'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = FAIL) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/mist_api/models/event_fastroam_type_enum.rb', line 35 def self.from_value(value, default_value = FAIL) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'fail' then FAIL when 'none' then NONE when 'pingpong' then PINGPONG when 'poor' then POOR when 'slow' then SLOW when 'success' then SUCCESS else default_value end end |
.validate(value) ⇒ Object
29 30 31 32 33 |
# File 'lib/mist_api/models/event_fastroam_type_enum.rb', line 29 def self.validate(value) return false if value.nil? EVENT_FASTROAM_TYPE_ENUM.include?(value) end |