Module: Alphadecimal

Defined in:
lib/alphadecimal.rb

Defined Under Namespace

Modules: Number, String

Constant Summary collapse

B62_CHRS =
[(B62_0..B62_9).map{|i|i}, (B62_A..B62_Z).map{|i|i}, (B62_a..B62_z).map{|i|i}].flatten

Class Method Summary collapse

Class Method Details

.char(str) ⇒ Object



4
5
6
# File 'lib/alphadecimal.rb', line 4

def self.char(str)
  str.respond_to?(:ord) ? str.ord : str[0]
end