Module: Xencoder
- Defined in:
- lib/xencoder.rb,
lib/xencoder/xbase.rb,
lib/xencoder/encoder.rb,
lib/xencoder/version.rb
Defined Under Namespace
Constant Summary collapse
- VERSION =
"0.2.0"
Class Method Summary collapse
Class Method Details
.decode(str) ⇒ Object
23 24 25 |
# File 'lib/xencoder.rb', line 23 def decode(str) encoder.decode(str) end |
.encode(num) ⇒ Object
19 20 21 |
# File 'lib/xencoder.rb', line 19 def encode(num) encoder.encode(num) end |
.encoder ⇒ Object
12 13 14 15 16 17 |
# File 'lib/xencoder.rb', line 12 def encoder @encoder ||= Encoder.new( '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', length: 6 ) end |