char_pool 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -2
- data/char_pool.gemspec +1 -0
- data/lib/char_pool/version.rb +1 -1
- data/lib/char_pool.rb +2 -1
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a501ac1f22437e0c0ff4feaaddb4ef06cd2db5d
|
4
|
+
data.tar.gz: fc45a49fa20cb3565221ebf9b62d07886afe9b85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52b3d5a4e4ee68a1e8aa695868e7def6fa94d8b83db45e91df12cf4925b25823df1bc3dd4028f63458ac947c116c47e46fd9b04931e2c48ac23ba3fc068d8185
|
7
|
+
data.tar.gz: b0e2060d5a6322c54ddf38193c0793f2684de8018f875bc427a36168fa44c97e86acfebc846950a79d7df2f888d04f4ab561bbf235c5fb30173772bb1fa00e56
|
data/README.md
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
# CharPool
|
2
2
|
|
3
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/char_pool`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
-
|
5
3
|
This gem will iterate over your chars set, for example if you have chars set ['a', 'b', 'c'], this gem will produce
|
6
4
|
|
7
5
|
```ruby
|
data/char_pool.gemspec
CHANGED
data/lib/char_pool/version.rb
CHANGED
data/lib/char_pool.rb
CHANGED
@@ -2,7 +2,7 @@ require 'char_pool/version'
|
|
2
2
|
|
3
3
|
class CharPool
|
4
4
|
def initialize(char_pool)
|
5
|
-
@char_pool = char_pool
|
5
|
+
@char_pool = char_pool.map &:to_s
|
6
6
|
end
|
7
7
|
|
8
8
|
def start(current = @char_pool.first)
|
@@ -35,6 +35,7 @@ class CharPool
|
|
35
35
|
private
|
36
36
|
def decode(string)
|
37
37
|
array = string.split('').map do |char|
|
38
|
+
|
38
39
|
@char_pool.index(char)
|
39
40
|
end
|
40
41
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: char_pool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Teja Sophista V.R.
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: pry
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
description:
|
56
70
|
email:
|
57
71
|
- tejanium@yahoo.com
|