nineteen-eighty-two 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nineteen/eighty/two/spectrum.rb +10 -1
- data/lib/nineteen/eighty/two/version.rb +1 -1
- data/nineteen-eighty-two.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25b72a202a79e28c2de96d8cc55f4af20f275644
|
4
|
+
data.tar.gz: be6fe9d6ae572ef9072e6a155b1faf11b290544d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63058063b9fab756884953aa20c72ddd8f26255640451212cbb1b0214c195975edc7b4887ae5a1e6fac438cb9874017c10cc1e45e04862665e6c2e793d051407
|
7
|
+
data.tar.gz: d41dba70453d1e711ae0b49694092d14075b4ca961b028b6d9c92e020115dbed70c2f9bc759ad40846d418416eac5663347a716bc4ebe89353da5b599d2e5aad
|
@@ -5,7 +5,6 @@ module Nineteen
|
|
5
5
|
CHARACTERS = YAML.load_file File.join File.dirname(__FILE__), '..', '..', '..', '..', 'config', 'characters.yml'
|
6
6
|
|
7
7
|
def self.[] *text
|
8
|
-
# require "pry" ; binding.pry
|
9
8
|
a = []
|
10
9
|
text.each do |t|
|
11
10
|
a += Spectrum.linify(t.chars.map { |c| Spectrum.get(c) })
|
@@ -14,6 +13,16 @@ module Nineteen
|
|
14
13
|
a
|
15
14
|
end
|
16
15
|
|
16
|
+
def self.to_h
|
17
|
+
h = {}
|
18
|
+
|
19
|
+
CHARACTERS.keys.each do |c|
|
20
|
+
h[c.to_sym] = get(c)
|
21
|
+
end
|
22
|
+
|
23
|
+
h
|
24
|
+
end
|
25
|
+
|
17
26
|
def self.get key
|
18
27
|
key = ' ' unless CHARACTERS[key]
|
19
28
|
CHARACTERS[key].map { |b| Spectrum.bits(b) }
|
data/nineteen-eighty-two.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.require_paths = ['lib']
|
21
21
|
|
22
22
|
spec.add_dependency 'erubis'
|
23
|
-
|
23
|
+
|
24
24
|
spec.add_development_dependency 'bundler', '~> 1.12'
|
25
25
|
spec.add_development_dependency 'rake', '~> 10.0'
|
26
26
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nineteen-eighty-two
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pikesley
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: erubis
|