typ 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/typ.rb +10 -21
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b0f29f7c51d7e758efd8a0d5aa3ff2df8c3bd67f090eb85d7aa9f8e0d8856bd3
4
- data.tar.gz: 31233ba93d6e965dd3cbcbb9aac0d887d43c826b9fb859282906e40167642c2f
3
+ metadata.gz: e49bb76b04240c1b96f1b20b1eb5cc2fce4168ee0b730e3b768ff3787b3d8e98
4
+ data.tar.gz: c4425deabbbb4fa53346ceb33b0697cc88b5b7094114f8549f9ea5fd222363e2
5
5
  SHA512:
6
- metadata.gz: e8e04787c558ca19a07774e8e8e5d1b16e89af45f5a9e82a72fdafbcdd2dfc69efead9215b4c29610df33949b4873f8c7258c9aa9fe584c613185951377cdfd5
7
- data.tar.gz: f50128054edf6eedd8974e5bd704416ada9e48dd3f4bf006d1c5b549ce5a5806bf5ee998ffb3e41dd24a57a5d79158efa1f965164902a3bcb96c19b72a2cf863
6
+ metadata.gz: e6cea78fa037f0d53208139274c39871da6431c338c20399f9af93928ab12812397963b602e2fd05d4999edc0295b431239243798ba09684f3547dfcf0a7bc67
7
+ data.tar.gz: d1c39f5d629a4b9b0a90e3aebc23f8c1bea7d713670463d0d5acd1a0a52a1e00997306da275c4a8ff623e02b9c1baa41d037fab63287063ff4d4b8f28b125da4
data/lib/typ.rb CHANGED
@@ -37,21 +37,6 @@ module Typ
37
37
  end
38
38
 
39
39
  module Is
40
- def self.included gate
41
- gate.extend Singleton
42
- end
43
-
44
- module Singleton
45
- attr_accessor :check
46
- end
47
-
48
- def initialize object
49
- @ok = self.class.check[object]
50
- end
51
-
52
- def ok?
53
- @ok
54
- end
55
40
 
56
41
  module Array
57
42
  class << self
@@ -67,12 +52,8 @@ module Typ
67
52
  end
68
53
 
69
54
  gate = Class.new
70
-
71
- gate.include Is
72
- gate.check = check
73
-
74
55
  gate.include self
75
- gate.array = array
56
+ gate.check, gate.array = check, array
76
57
  gate
77
58
  end
78
59
  end
@@ -82,12 +63,20 @@ module Typ
82
63
  end
83
64
 
84
65
  module Singleton
85
- attr_accessor :array
66
+ attr_accessor :check, :array
86
67
  end
87
68
 
88
69
  def to_a
89
70
  self.class.array
90
71
  end
72
+
73
+ def ok?
74
+ @ok
75
+ end
76
+
77
+ def initialize it
78
+ @ok = self.class.check[it]
79
+ end
91
80
  end
92
81
  end
93
82
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typ
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
  - Anatoly Chernow