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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ef456b0ba2ad4e211b79ed2a636a00e45e7ae3ee
4
- data.tar.gz: 88fc3251936b5b465c132eed99528608ce212460
3
+ metadata.gz: 25b72a202a79e28c2de96d8cc55f4af20f275644
4
+ data.tar.gz: be6fe9d6ae572ef9072e6a155b1faf11b290544d
5
5
  SHA512:
6
- metadata.gz: 5eb5669e89233030594979858831935cd09d4b60644e5bde1522c03055f95f579bc95b45896c935dfa36f2a34858d6c101c5f7e5b11bf90d311bb667a4e2cb1b
7
- data.tar.gz: f365ba1b71cc7f91f5e46de2292dc8ea6b5c4a77fd21c9311ed7b7ae0e61bf35fdd019c4ddd47cbc83bf863bb19dc6b9cec342bf47889fd3d107561659dee94a
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) }
@@ -1,7 +1,7 @@
1
1
  module Nineteen
2
2
  module Eighty
3
3
  module Two
4
- VERSION = "0.1.5"
4
+ VERSION = "0.1.6"
5
5
  end
6
6
  end
7
7
  end
@@ -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.5
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-19 00:00:00.000000000 Z
11
+ date: 2016-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: erubis