types 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/lib/types/nil.rb ADDED
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright, 2020, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in
13
+ # all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ # THE SOFTWARE.
22
+
23
+ require_relative 'generic'
24
+
25
+ module Types
26
+ module Nil
27
+ extend Generic
28
+
29
+ def self.parse(input)
30
+ if input =~ /nil|null/i
31
+ return nil
32
+ else
33
+ raise ArgumentError, "Cannot coerce #{input.inspect} into Nil!"
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright, 2020, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in
13
+ # all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ # THE SOFTWARE.
22
+
23
+ require_relative 'generic'
24
+
25
+ module Types
26
+ module Numeric
27
+ extend Generic
28
+
29
+ def self.parse(input)
30
+ case input
31
+ when Numeric then input
32
+ when /\./ then Float(input)
33
+ else Integer(input)
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright, 2020, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in
13
+ # all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ # THE SOFTWARE.
22
+
23
+ require_relative 'generic'
24
+
25
+ module Types
26
+ module String
27
+ extend Generic
28
+
29
+ def self.parse(input)
30
+ input.to_s
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright, 2020, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in
13
+ # all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ # THE SOFTWARE.
22
+
23
+ require_relative 'generic'
24
+
25
+ module Types
26
+ module Symbol
27
+ extend Generic
28
+
29
+ def self.parse(input)
30
+ input.to_sym
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,69 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright, 2020, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in
13
+ # all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ # THE SOFTWARE.
22
+
23
+ require_relative 'generic'
24
+ require 'json'
25
+
26
+ module Types
27
+ class Tuple
28
+ include Generic
29
+
30
+ def initialize(item_types)
31
+ @item_types = item_types
32
+ end
33
+
34
+ attr :item_types
35
+
36
+ def composite?
37
+ true
38
+ end
39
+
40
+ def parse(input)
41
+ case input
42
+ when ::String
43
+ return parse_values(parse_string(input))
44
+ when ::Array
45
+ return parse_values(input)
46
+ else
47
+ raise ArgumentError, "Cannot coerce #{input.inspect} into tuple!"
48
+ end
49
+ end
50
+
51
+ def to_s
52
+ "Tuple(#{@item_types.join(', ')})"
53
+ end
54
+
55
+ private
56
+
57
+ def parse_string(input)
58
+ ::JSON.parse("[#{input}]")
59
+ end
60
+
61
+ def parse_values(input)
62
+ input.map.with_index{|value, index| @item_types[index].parse(value)}
63
+ end
64
+ end
65
+
66
+ def self.Tuple(*item_types)
67
+ Tuple.new(item_types)
68
+ end
69
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright, 2020, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in
13
+ # all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ # THE SOFTWARE.
22
+
23
+ module Types
24
+ VERSION = "0.2.0"
25
+ end
data/lib/types.rb CHANGED
@@ -1,130 +1,52 @@
1
- # encoding: utf-8
2
- # (c) 2011 Martin Kozák (martinkozak@martinkozak.net)
1
+ # frozen_string_literal: true
3
2
 
4
- require "multitype-introspection"
5
-
6
- ##
7
- # Root library module.
8
- #
9
-
10
- module Types
11
-
12
- ##
13
- # Type defining class.
14
- # @abstract
15
- #
16
-
17
- class Type
18
-
19
- ##
20
- # Returns classes which are part of this type.
21
- #
22
- # @return [Array] array of class objects
23
- # @abstract
24
- #
25
-
26
- def type_classes
27
- raise Exception::new("Class is abstract.")
28
- end
29
-
30
- ##
31
- # Returns types which are part of this type.
32
- # @return [Array] array of types objects
33
- #
34
-
35
- def type_types
36
- [ ]
37
- end
38
-
39
- ##
40
- # Matches object is of this type.
41
- #
42
- # @param [Object] object object for type matching
43
- # @return [Boolean] 'true' if match, 'false' in otherwise
44
- #
45
-
46
- def match_type?(object)
47
- result = object.kind_of_any? self.type_classes
48
- if not result
49
- result = object.type_of_any? self.type_types
50
- end
51
-
52
- return result
53
- end
54
-
55
- end
56
-
57
- ##
58
- # Defines generic boolean type.
59
- # @abstract
60
- #
61
-
62
- class Boolean < Type
63
-
64
- ##
65
- # Returns classes which are part of this type.
66
- # In case of boolean <tt>TrueClass</tt> and <tt>FalseClass</tt>.
67
- #
68
- # @return [Array] array of types objects
69
- #
70
-
71
- def type_classes
72
- [TrueClass, FalseClass]
73
- end
74
-
75
- end
76
- end
77
-
78
- ##
79
- # Extension of built-in Object class.
80
- #
81
-
82
- class Object
83
-
84
- ##
85
- # Indicates object is type of some class.
86
- # If class isn't Type, matches against #kind_of?.
87
- #
88
- # @param [Types::Type, Class] cls some type or class specification
89
- # @return [Boolean] 'true' if it is, 'false' in otherwise
90
- #
91
-
92
- def type_of?(cls)
93
- cls_new = cls::new
94
- if cls_new.kind_of? Types::Type
95
- cls_new.match_type? self
96
- else
97
- self.kind_of? cls
98
- end
99
- end
100
-
101
- ##
102
- # Indicates object is type of some class in the list.
103
- # If class isn't Type, matches against #kind_of?.
104
- #
105
- # @param [Array] classes array of Type or Class objects
106
- # @return [Boolean] 'true' if it is, 'false' in otherwise
107
- #
108
-
109
- def type_of_any?(classes)
110
- if not classes.kind_of? Array
111
- raise Exception::new("Array expected.")
112
- end
113
-
114
- classes.each do |cls|
115
- if self.type_of? cls
116
- return true
117
- end
118
- end
119
-
120
- return false
121
- end
122
- end
123
-
124
- ##
125
- # Redefines generic boolean type in main namespace.
126
- # @abstract
3
+ # Copyright, 2020, by Samuel G. D. Williams. <http://www.codeotaku.com>
127
4
  #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in
13
+ # all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ # THE SOFTWARE.
22
+
23
+ require_relative 'types/version'
24
+
25
+ require_relative 'types/any'
26
+ require_relative 'types/array'
27
+ require_relative 'types/block'
28
+ require_relative 'types/boolean'
29
+ require_relative 'types/class'
30
+ require_relative 'types/decimal'
31
+ require_relative 'types/float'
32
+ require_relative 'types/hash'
33
+ require_relative 'types/integer'
34
+ require_relative 'types/lambda'
35
+ require_relative 'types/method'
36
+ require_relative 'types/nil'
37
+ require_relative 'types/numeric'
38
+ require_relative 'types/string'
39
+ require_relative 'types/symbol'
40
+ require_relative 'types/tuple'
128
41
 
129
- class Boolean < Types::Boolean
42
+ module Types
43
+ VALID_SIGNATURE = /\A[a-zA-Z\(\):, |]+\z/
44
+
45
+ def self.parse(signature)
46
+ if signature =~ VALID_SIGNATURE
47
+ eval(signature, binding)
48
+ else
49
+ raise ArgumentError, "Invalid type signature: #{signature.inspect}!"
50
+ end
51
+ end
130
52
  end
data.tar.gz.sig ADDED
@@ -0,0 +1,2 @@
1
+ �x�^P����޳ �W2E����3uL��7x�F�� tM���g0��eET��DK~�cj�ǚ-J�jo
2
+ �Ff-���/(`Ơ.����.��u-j�#~y?b9��±�m���L��G
metadata CHANGED
@@ -1,118 +1,90 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: types
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 1
8
- - 1
9
- version: 0.1.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0
10
5
  platform: ruby
11
- authors:
12
- - "Martin Koz\xC3\xA1k"
13
- autorequire:
6
+ authors:
7
+ - Samuel Williams
8
+ autorequire:
14
9
  bindir: bin
15
- cert_chain: []
16
-
17
- date: 2011-01-19 00:00:00 +01:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- name: multitype-introspection
22
- requirement: &id001 !ruby/object:Gem::Requirement
23
- none: false
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 0
29
- - 1
30
- - 0
31
- version: 0.1.0
32
- type: :runtime
33
- prerelease: false
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: bundler
37
- requirement: &id002 !ruby/object:Gem::Requirement
38
- none: false
39
- requirements:
40
- - - ~>
41
- - !ruby/object:Gem::Version
42
- segments:
43
- - 1
44
- - 0
45
- - 0
46
- version: 1.0.0
47
- type: :development
48
- prerelease: false
49
- version_requirements: *id002
50
- - !ruby/object:Gem::Dependency
51
- name: jeweler
52
- requirement: &id003 !ruby/object:Gem::Requirement
53
- none: false
54
- requirements:
55
- - - ~>
56
- - !ruby/object:Gem::Version
57
- segments:
58
- - 1
59
- - 5
60
- - 2
61
- version: 1.5.2
62
- type: :development
63
- prerelease: false
64
- version_requirements: *id003
65
- description:
66
- email: martinkozak@martinkozak.net
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIEhDCCAuygAwIBAgIBATANBgkqhkiG9w0BAQsFADA3MTUwMwYDVQQDDCxzYW11
14
+ ZWwud2lsbGlhbXMvREM9b3Jpb250cmFuc2Zlci9EQz1jby9EQz1uejAeFw0yMTA4
15
+ MTYwNjMzNDRaFw0yMjA4MTYwNjMzNDRaMDcxNTAzBgNVBAMMLHNhbXVlbC53aWxs
16
+ aWFtcy9EQz1vcmlvbnRyYW5zZmVyL0RDPWNvL0RDPW56MIIBojANBgkqhkiG9w0B
17
+ AQEFAAOCAY8AMIIBigKCAYEAyXLSS/cw+fXJ5e7hi+U/TeChPWeYdwJojDsFY1xr
18
+ xvtqbTTL8gbLHz5LW3QD2nfwCv3qTlw0qI3Ie7a9VMJMbSvgVEGEfQirqIgJXWMj
19
+ eNMDgKsMJtC7u/43abRKx7TCURW3iWyR19NRngsJJmaR51yGGGm2Kfsr+JtKKLtL
20
+ L188Wm3f13KAx7QJU8qyuBnj1/gWem076hzdA7xi1DbrZrch9GCRz62xymJlrJHn
21
+ 9iZEZ7AxrS7vokhMlzSr/XMUihx/8aFKtk+tMLClqxZSmBWIErWdicCGTULXCBNb
22
+ E/mljo4zEVKhlTWpJklMIhr55ZRrSarKFuW7en0+tpJrfsYiAmXMJNi4XAYJH7uL
23
+ rgJuJwSaa/dMz+VmUoo7VKtSfCoOI+6v5/z0sK3oT6sG6ZwyI47DBq2XqNC6tnAj
24
+ w+XmCywiTQrFzMMAvcA7rPI4F0nU1rZId51rOvvfxaONp+wgTi4P8owZLw0/j0m4
25
+ 8C20DYi6EYx4AHDXiLpElWh3AgMBAAGjgZowgZcwCQYDVR0TBAIwADALBgNVHQ8E
26
+ BAMCBLAwHQYDVR0OBBYEFB6ZaeWKxQjGTI+pmz7cKRmMIywwMC4GA1UdEQQnMCWB
27
+ I3NhbXVlbC53aWxsaWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MC4GA1UdEgQnMCWB
28
+ I3NhbXVlbC53aWxsaWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MA0GCSqGSIb3DQEB
29
+ CwUAA4IBgQBVoM+pu3dpdUhZM1w051iw5GfiqclAr1Psypf16Tiod/ho//4oAu6T
30
+ 9fj3DPX/acWV9P/FScvqo4Qgv6g4VWO5ZU7z2JmPoTXZtYMunRAmQPFL/gSUc6aK
31
+ vszMHIyhtyzRc6DnfW2AiVOjMBjaYv8xXZc9bduniRVPrLR4J7ozmGLh4o4uJp7w
32
+ x9KCFaR8Lvn/r0oJWJOqb/DMAYI83YeN2Dlt3jpwrsmsONrtC5S3gOUle5afSGos
33
+ bYt5ocnEpKSomR9ZtnCGljds/aeO1Xgpn2r9HHcjwnH346iNrnHmMlC7BtHUFPDg
34
+ Ts92S47PTOXzwPBDsrFiq3VLbRjHSwf8rpqybQBH9MfzxGGxTaETQYOd6b4e4Ag6
35
+ y92abGna0bmIEb4+Tx9rQ10Uijh1POzvr/VTH4bbIPy9FbKrRsIQ24qDbNJRtOpE
36
+ RAOsIl+HOBTb252nx1kIRN5hqQx272AJCbCjKx8egcUQKffFVVCI0nye09v5CK+a
37
+ HiLJ8VOFx6w=
38
+ -----END CERTIFICATE-----
39
+ date: 2022-07-01 00:00:00.000000000 Z
40
+ dependencies: []
41
+ description:
42
+ email:
67
43
  executables: []
68
-
69
44
  extensions: []
70
-
71
- extra_rdoc_files:
72
- - LICENSE.txt
73
- - README.md
74
- files:
75
- - .document
76
- - Gemfile
77
- - Gemfile.lock
78
- - LICENSE.txt
79
- - README.md
80
- - Rakefile
81
- - VERSION
45
+ extra_rdoc_files: []
46
+ files:
82
47
  - lib/types.rb
83
- - types.gemspec
84
- has_rdoc: true
85
- homepage: http://github.com/martinkozak/types
86
- licenses:
48
+ - lib/types/any.rb
49
+ - lib/types/array.rb
50
+ - lib/types/block.rb
51
+ - lib/types/boolean.rb
52
+ - lib/types/class.rb
53
+ - lib/types/decimal.rb
54
+ - lib/types/float.rb
55
+ - lib/types/generic.rb
56
+ - lib/types/hash.rb
57
+ - lib/types/integer.rb
58
+ - lib/types/lambda.rb
59
+ - lib/types/method.rb
60
+ - lib/types/nil.rb
61
+ - lib/types/numeric.rb
62
+ - lib/types/string.rb
63
+ - lib/types/symbol.rb
64
+ - lib/types/tuple.rb
65
+ - lib/types/version.rb
66
+ homepage: https://github.com/ioquatix/types
67
+ licenses:
87
68
  - MIT
88
- post_install_message:
69
+ metadata:
70
+ funding_uri: https://github.com/sponsors/ioquatix/
71
+ post_install_message:
89
72
  rdoc_options: []
90
-
91
- require_paths:
73
+ require_paths:
92
74
  - lib
93
- required_ruby_version: !ruby/object:Gem::Requirement
94
- none: false
95
- requirements:
75
+ required_ruby_version: !ruby/object:Gem::Requirement
76
+ requirements:
96
77
  - - ">="
97
- - !ruby/object:Gem::Version
98
- hash: -4017891773010528090
99
- segments:
100
- - 0
101
- version: "0"
102
- required_rubygems_version: !ruby/object:Gem::Requirement
103
- none: false
104
- requirements:
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
80
+ required_rubygems_version: !ruby/object:Gem::Requirement
81
+ requirements:
105
82
  - - ">="
106
- - !ruby/object:Gem::Version
107
- segments:
108
- - 0
109
- version: "0"
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
110
85
  requirements: []
111
-
112
- rubyforge_project:
113
- rubygems_version: 1.3.7
114
- signing_key:
115
- specification_version: 3
116
- summary: Introduces group of classes as eqivalent to some data types in other languages such as boolean and allows introspection according to type of class too. In fact, partially replaces multiple inheritance because introduces unlimited formal genericity for every class.
86
+ rubygems_version: 3.3.7
87
+ signing_key:
88
+ specification_version: 4
89
+ summary: A simple human-readable and Ruby-parsable type library.
117
90
  test_files: []
118
-
metadata.gz.sig ADDED
Binary file
data/.document DELETED
@@ -1,5 +0,0 @@
1
- lib/**/*.rb
2
- bin/*
3
- -
4
- features/**/*.feature
5
- LICENSE.txt
data/Gemfile DELETED
@@ -1,11 +0,0 @@
1
- source "http://rubygems.org"
2
- # Add dependencies required to use your gem here.
3
- # Example:
4
- gem "multitype-introspection", ">= 0.1.0"
5
-
6
- # Add dependencies to develop your gem here.
7
- # Include everything needed to run rake, tests, features, etc.
8
- group :development do
9
- gem "bundler", "~> 1.0.0"
10
- gem "jeweler", "~> 1.5.2"
11
- end
data/Gemfile.lock DELETED
@@ -1,18 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- git (1.2.5)
5
- jeweler (1.5.2)
6
- bundler (~> 1.0.0)
7
- git (>= 1.2.5)
8
- rake
9
- multitype-introspection (0.1.0)
10
- rake (0.8.7)
11
-
12
- PLATFORMS
13
- ruby
14
-
15
- DEPENDENCIES
16
- bundler (~> 1.0.0)
17
- jeweler (~> 1.5.2)
18
- multitype-introspection (>= 0.1.0)
data/LICENSE.txt DELETED
@@ -1,20 +0,0 @@
1
- Copyright (c) 2011 Martin Kozák
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.