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.1.0"
Class Method Summary collapse
Class Method Details
.decode(str) ⇒ Object
22 23 24 |
# File 'lib/xencoder.rb', line 22 def decode(str) encoder.decode(str) end |
.encode(num) ⇒ Object
18 19 20 |
# File 'lib/xencoder.rb', line 18 def encode(num) encoder.encode(num) end |
.encoder ⇒ Object
11 12 13 14 15 16 |
# File 'lib/xencoder.rb', line 11 def encoder @encoder ||= Encoder.new( '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', length: 6 ) end |
.new(*args) ⇒ Object
7 8 9 |
# File 'lib/xencoder.rb', line 7 def new(*args) Encoder.new(*args) end |