class ESI::GetCorporationCorporationIdMiningObservers200Ok::EnumAttributeValidator

Attributes

allowable_values[R]
datatype[R]

Public Class Methods

new(datatype, allowable_values) click to toggle source
# File lib/esi-client-bvv/models/get_corporation_corporation_id_mining_observers_200_ok.rb, line 31
def initialize(datatype, allowable_values)
  @allowable_values = allowable_values.map do |value|
    case datatype.to_s
    when /Integer/i
      value.to_i
    when /Float/i
      value.to_f
    else
      value
    end
  end
end

Public Instance Methods

valid?(value) click to toggle source
# File lib/esi-client-bvv/models/get_corporation_corporation_id_mining_observers_200_ok.rb, line 44
def valid?(value)
  !value || allowable_values.include?(value)
end