Class: WeConnect::Enum
- Inherits:
-
Object
- Object
- WeConnect::Enum
- Defined in:
- lib/weconnect/const.rb
Direct Known Subclasses
Badge, Control::AccessControlOperation, Control::ControlOperation, Control::HonkAndFlashControlOperation, Control::Operation, DevicePlatform, EnrollmentStatus, ExternalPower, JobDomain, LedColor, PlugConnectionState, PlugLockState, Role, TripType, UserRoleStatus
Class Method Summary collapse
Class Method Details
.enum(array, proc = :to_s) ⇒ Object
12 13 14 15 16 |
# File 'lib/weconnect/const.rb', line 12 def self.enum(array, proc=:to_s) array.each do |c| const_set c.underscore.upcase,c.send(proc) end end |