Class: ShellEv::SingleLocationMarkerStatusEnum

Inherits:
Object
  • Object
show all
Defined in:
lib/shell_ev/models/single_location_marker_status_enum.rb

Overview

Minimum of all status values in the Marker, e.g. if at least one Evse in the Marker is available, the value will be available

Constant Summary collapse

SINGLE_LOCATION_MARKER_STATUS_ENUM =
[
  # TODO: Write general description for AVAILABLE
  AVAILABLE = 'Available'.freeze,

  # TODO: Write general description for OCCUPIED
  OCCUPIED = 'Occupied'.freeze,

  # TODO: Write general description for UNAVAILABLE
  UNAVAILABLE = 'Unavailable'.freeze,

  # TODO: Write general description for UNKNOWN
  UNKNOWN = 'Unknown'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.validate(value) ⇒ Object



24
25
26
27
28
# File 'lib/shell_ev/models/single_location_marker_status_enum.rb', line 24

def self.validate(value)
  return false if value.nil?

  SINGLE_LOCATION_MARKER_STATUS_ENUM.include?(value)
end