class RubyPtvApi::Model::XTour::GoalImportance

Constants

RANKING

Public Class Methods

validate(value) click to toggle source
# File lib/ruby_ptv_api/model/x_tour/goal_importance.rb, line 34
def self.validate(value)
  value = RANKING[value] if value.is_a? Symbol
  unless RANKING.values.includes?(value)
    raise WrongParameterFormat.new("#{value} is not a valid must be in #{RANKING}. Both Symbol and Fixnum are allowed")
  end
  value
end