nineteen-eighty-two 0.1.4 → 0.1.5

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: 966a5f8d59bfe35e4a089eb778286579a85502e1
4
- data.tar.gz: d645dd42ca4b355dec967cb7b741f9dfb2c1d1de
3
+ metadata.gz: ef456b0ba2ad4e211b79ed2a636a00e45e7ae3ee
4
+ data.tar.gz: 88fc3251936b5b465c132eed99528608ce212460
5
5
  SHA512:
6
- metadata.gz: b48d485b1a8b55a704aa5c31223e4ca204551db6a184caf5ea55690d0eaceab369579cb11d8cc74dde1cad5610594a400b6b7b4a653d1f23288f4afc1e3c96a4
7
- data.tar.gz: 9cfbdb519c1cdca9adc18af672fdc22da8e0f606aff002ee7a74daa169cfc73b3ae86bdf1fa93b5ab9048752ab03e5b3b0811ef5f296505e16d7cb3fa0cb399f
6
+ metadata.gz: 5eb5669e89233030594979858831935cd09d4b60644e5bde1522c03055f95f579bc95b45896c935dfa36f2a34858d6c101c5f7e5b11bf90d311bb667a4e2cb1b
7
+ data.tar.gz: f365ba1b71cc7f91f5e46de2292dc8ea6b5c4a77fd21c9311ed7b7ae0e61bf35fdd019c4ddd47cbc83bf863bb19dc6b9cec342bf47889fd3d107561659dee94a
@@ -20,6 +20,16 @@ module Nineteen
20
20
  hex
21
21
  end
22
22
 
23
+ def self.to_h
24
+ h = {}
25
+ self.constants[1..-1].sort.each do |c|
26
+ h[c] = self[c]
27
+ h[c.downcase] = self[c.downcase]
28
+ end
29
+
30
+ h
31
+ end
32
+
23
33
  def self.method_missing m, *args
24
34
  self[m]
25
35
  end
@@ -10,6 +10,10 @@ module Nineteen
10
10
  "#{key} - #{MESSAGES[key]}"
11
11
  end
12
12
 
13
+ def self.to_h
14
+ MESSAGES
15
+ end
16
+
13
17
  def self.method_missing m, *args
14
18
  key = case m
15
19
  when :zero
@@ -1,7 +1,7 @@
1
1
  module Nineteen
2
2
  module Eighty
3
3
  module Two
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.5"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nineteen-eighty-two
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - pikesley