Class: AllpayWebService::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/allpay/const.rb

Direct Known Subclasses

ActionType, AddMember, CharSet, English, ThreeD, UseRedeem

Class Method Summary collapse

Class Method Details

.readable_keysObject



3
4
5
6
7
8
# File 'lib/allpay/const.rb', line 3

def self.readable_keys
  result = self.constants.map { |constant| "#{self.name}::#{constant}" }.join(", ")
  position = result.rindex(", ")
  result[position..position+1] = " or "
  result
end

.valuesObject



10
11
12
# File 'lib/allpay/const.rb', line 10

def self.values
  self.constants.map { |constant| self.const_get(constant) }
end