encode_with_alphabet 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +13 -0
- data/lib/encode_with_alphabet/version.rb +1 -1
- metadata +5 -4
data/README.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# EncodeWithAlphabet
|
2
|
+
|
3
|
+
Provides a simple method for encoding integers with specified alphabet.
|
4
|
+
By default alphabet is `0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ`.
|
5
|
+
|
6
|
+
|
7
|
+
# Examples
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
EncodeWithAlphabet.encode 100 #=> "2S"
|
11
|
+
EncodeWithAlphabet.encode 100, "01" #=> "1100100"
|
12
|
+
EncodeWithAlphabet.encode 1000000000000, "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" #=> "hBxM5A4"
|
13
|
+
```
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: encode_with_alphabet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Alexander Glushkov
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-09-
|
18
|
+
date: 2011-09-21 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rspec
|
@@ -45,6 +45,7 @@ files:
|
|
45
45
|
- .gitignore
|
46
46
|
- .rvmrc
|
47
47
|
- Gemfile
|
48
|
+
- README.md
|
48
49
|
- Rakefile
|
49
50
|
- encode_with_alphabet.gemspec
|
50
51
|
- lib/encode_with_alphabet.rb
|