co_co_ge 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/co_co_ge.gemspec +2 -2
- data/lib/co_co_ge/code_generator.rb +2 -2
- data/lib/co_co_ge/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 582f585d8c163aee21d7616dc4d971c2f88773c9
|
4
|
+
data.tar.gz: 86c1e3c341e3c40397d81534b22217b950548c48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa9a9d92197aeb296415259dfea1e951bfd8dab2aef864a968c5ae6983037f27a35f926100f21077c27ddc3a4a54d826d19332fe8c0cddc648165cf0d01e7dd0
|
7
|
+
data.tar.gz: 4caa9e409760df6b125edc85acc960e16493191b9c7cad9c43d9aa8ab9cf420138f759fd47290b634c32ec7adfe8d62bd62f74f73a58f648fdc034227242559d
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
data/co_co_ge.gemspec
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: co_co_ge 0.0.
|
2
|
+
# stub: co_co_ge 0.0.3 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "co_co_ge".freeze
|
6
|
-
s.version = "0.0.
|
6
|
+
s.version = "0.0.3"
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
9
9
|
s.require_paths = ["lib".freeze]
|
@@ -6,6 +6,8 @@ class CoCoGe::CodeGenerator
|
|
6
6
|
@separator = separator.to_s
|
7
7
|
@parts_per_word = parts_per_word
|
8
8
|
|
9
|
+
check_arguments
|
10
|
+
|
9
11
|
!!bits ^ !!length or raise ArgumentError,
|
10
12
|
"either bits or length parameter is required"
|
11
13
|
if bits
|
@@ -15,8 +17,6 @@ class CoCoGe::CodeGenerator
|
|
15
17
|
@length = length
|
16
18
|
@bits = (Math.log(@symbols.size ** @length) / Math.log(2)).floor
|
17
19
|
end
|
18
|
-
|
19
|
-
check_arguments
|
20
20
|
end
|
21
21
|
|
22
22
|
attr_reader :symbols
|
data/lib/co_co_ge/version.rb
CHANGED