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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d910e132a44d78cf49a0b8a6787ab5b1256e5633
4
- data.tar.gz: d0f58b63e7e50c1624a350a23534f946ba1f9d63
3
+ metadata.gz: 582f585d8c163aee21d7616dc4d971c2f88773c9
4
+ data.tar.gz: 86c1e3c341e3c40397d81534b22217b950548c48
5
5
  SHA512:
6
- metadata.gz: cc22be5bb2368d552e5ffd27f33e3abfb2ce589bae11d3d51ad4908fd5920e628516bbc086632aaccd84000a04280b2a7f6e0fdd0ef46dccd946c777f990e0cc
7
- data.tar.gz: b2b13deaa967da36b308b4968c130d7c7caa9d864ad1d1849a757f8c247e4ea0606858be3f5a5911062dc736ac2e9f9df9005931c87c9938496f64611c1c3508
6
+ metadata.gz: fa9a9d92197aeb296415259dfea1e951bfd8dab2aef864a968c5ae6983037f27a35f926100f21077c27ddc3a4a54d826d19332fe8c0cddc648165cf0d01e7dd0
7
+ data.tar.gz: 4caa9e409760df6b125edc85acc960e16493191b9c7cad9c43d9aa8ab9cf420138f759fd47290b634c32ec7adfe8d62bd62f74f73a58f648fdc034227242559d
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
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 ruby lib
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.2"
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
@@ -1,6 +1,6 @@
1
1
  module CoCoGe
2
2
  # CoCoGe version
3
- VERSION = '0.0.2'
3
+ VERSION = '0.0.3'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: co_co_ge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank