Module: Ronin::Support::Encoding::Base36
- Defined in:
- lib/ronin/support/encoding/base36.rb
Overview
Class Method Summary collapse
-
.decode(string) ⇒ Integer
Base36 decodes the given String.
-
.encode_int(int) ⇒ String
Base36 encodes an integer.
Class Method Details
.decode(string) ⇒ Integer
Base36 decodes the given String.
59 60 61 |
# File 'lib/ronin/support/encoding/base36.rb', line 59 def self.decode(string) string.to_i(36) end |
.encode_int(int) ⇒ String
Base36 encodes an integer.
46 47 48 |
# File 'lib/ronin/support/encoding/base36.rb', line 46 def self.encode_int(int) int.to_s(36) end |