class SnapTrade::Type
def self.all_vars
def self.all_vars @all_vars ||= [MARKET, LIMIT, STOP_LOSS_MARKET, STOP_LOSS_LIMIT, TAKE_PROFIT_MARKET, TAKE_PROFIT_LIMIT].freeze end
def self.build_from_hash(value)
-
(String)- The enum value
Parameters:
-
The(String) -- enum value in the form of the string
def self.build_from_hash(value) new.build_from_hash(value) end
def build_from_hash(value)
-
(String)- The enum value
Parameters:
-
The(String) -- enum value in the form of the string
def build_from_hash(value) return value if Type.all_vars.include?(value) raise "Invalid ENUM value #{value} for class #Type" end