Class: Airthings::DeviceType
- Inherits:
-
Object
- Object
- Airthings::DeviceType
- Defined in:
- lib/airthings/models/device_type.rb
Constant Summary collapse
- WAVE =
"WAVE"
- WAVE_MIST =
"WAVE_MIST"
- WAVE_GEN2 =
"WAVE_GEN2"
- WAVE_MINI =
"WAVE_MINI"
- WAVE_PLUS =
"WAVE_PLUS"
- WAVE_CO2 =
"WAVE_CO2"
- VIEW_PLUS =
"VIEW_PLUS"
- VIEW_PLUS_BUSINESS =
"VIEW_PLUS_BUSINESS"
- VIEW_POLLUTION =
"VIEW_POLLUTION"
- VIEW_RADON =
"VIEW_RADON"
- VIEW_CO2 =
"VIEW_CO2"
- SPACE_CO2_MINI =
"SPACE_CO2_MINI"
- WAVE_ENHANCE =
"WAVE_ENHANCE"
- HUB =
"HUB"
- HOME =
"HOME"
- PRO =
"PRO"
- CLOUDBERRY =
"CLOUDBERRY"
- AIRTIGHT =
"AIRTIGHT"
- AGGREGATED_GROUP =
"AGGREGATED_GROUP"
- ZONE_GROUP =
"ZONE_GROUP"
- BALANCE_CONTROL =
"BALANCE_CONTROL"
- INLET_AIR_CONTROL =
"INLET_AIR_CONTROL"
- VENT_CONTROLLER =
"VENT_CONTROLLER"
- AIRLY =
"AIRLY"
- AIRLY_NO2 =
"AIRLY_NO2"
- AIRLY_CO =
"AIRLY_CO"
- AIRLY_NO =
"AIRLY_NO"
- BREEZOMETER_WEATHER =
"BREEZOMETER_WEATHER"
- BACNET =
"BACNET"
- UNKNOWN =
"UNKNOWN"
Class Method Summary collapse
- .all_vars ⇒ Object
-
.build_from_hash(value) ⇒ String
Builds the enum from string.
Instance Method Summary collapse
-
#build_from_hash(value) ⇒ String
Builds the enum from string.
Class Method Details
.all_vars ⇒ Object
49 50 51 |
# File 'lib/airthings/models/device_type.rb', line 49 def self.all_vars @all_vars ||= [WAVE, WAVE_MIST, WAVE_GEN2, WAVE_MINI, WAVE_PLUS, WAVE_CO2, VIEW_PLUS, VIEW_PLUS_BUSINESS, VIEW_POLLUTION, VIEW_RADON, VIEW_CO2, SPACE_CO2_MINI, WAVE_ENHANCE, HUB, HOME, PRO, CLOUDBERRY, AIRTIGHT, AGGREGATED_GROUP, ZONE_GROUP, BALANCE_CONTROL, INLET_AIR_CONTROL, VENT_CONTROLLER, AIRLY, AIRLY_NO2, AIRLY_CO, AIRLY_NO, BREEZOMETER_WEATHER, BACNET, UNKNOWN].freeze end |
.build_from_hash(value) ⇒ String
Builds the enum from string
56 57 58 |
# File 'lib/airthings/models/device_type.rb', line 56 def self.build_from_hash(value) new.build_from_hash(value) end |
Instance Method Details
#build_from_hash(value) ⇒ String
Builds the enum from string
63 64 65 66 67 |
# File 'lib/airthings/models/device_type.rb', line 63 def build_from_hash(value) return value if DeviceType.all_vars.include?(value) raise "Invalid ENUM value #{value} for class #DeviceType" end |