types 0.1.3 → 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,131 +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
- require "abstract"
6
-
7
- ##
8
- # Root library module.
9
- #
10
-
11
- module Types
12
-
13
- ##
14
- # Type defining class.
15
- # @abstract
16
- #
17
-
18
- class Type
19
-
20
- ##
21
- # Returns classes which are part of this type.
22
- #
23
- # @return [Array] array of class objects
24
- # @abstract
25
- #
26
-
27
- def type_classes
28
- not_implemented
29
- end
30
-
31
- ##
32
- # Returns types which are part of this type.
33
- # @return [Array] array of types objects
34
- #
35
-
36
- def type_types
37
- [ ]
38
- end
39
-
40
- ##
41
- # Matches object is of this type.
42
- #
43
- # @param [Object] object object for type matching
44
- # @return [Boolean] +true+ if match, +false+ in otherwise
45
- #
46
-
47
- def match_type?(object)
48
- result = object.kind_of_any? self.type_classes
49
- if not result
50
- result = object.type_of_any? self.type_types
51
- end
52
-
53
- return result
54
- end
55
-
56
- end
57
-
58
- ##
59
- # Defines generic boolean type.
60
- # @abstract
61
- #
62
-
63
- class Boolean < Type
64
-
65
- ##
66
- # Returns classes which are part of this type.
67
- # In case of boolean +TrueClass+ and +FalseClass+.
68
- #
69
- # @return [Array] array of types objects
70
- #
71
-
72
- def type_classes
73
- [TrueClass, FalseClass]
74
- end
75
-
76
- end
77
- end
78
-
79
- ##
80
- # Extension of built-in Object class.
81
- #
82
-
83
- class Object
84
-
85
- ##
86
- # Indicates object is type of some class.
87
- # If class isn't {Types::Type Type}, matches against +#kind_of?+.
88
- #
89
- # @param [Types::Type, Class] cls some type or class specification
90
- # @return [Boolean] +true+ if it is, +false+ in otherwise
91
- #
92
-
93
- def type_of?(cls)
94
- cls_new = cls::new
95
- if cls_new.kind_of? Types::Type
96
- cls_new.match_type? self
97
- else
98
- self.kind_of? cls
99
- end
100
- end
101
-
102
- ##
103
- # Indicates object is type of some class in the list.
104
- # If class isn't {Types::Type Type}, matches against +#kind_of?+.
105
- #
106
- # @param [Array] classes array of {Types::Type Type} or +Class+ objects
107
- # @return [Boolean] +true+ if it is, +false+ in otherwise
108
- #
109
-
110
- def type_of_any?(classes)
111
- if not classes.kind_of? Array
112
- raise Exception::new("Array expected.")
113
- end
114
-
115
- classes.each do |cls|
116
- if self.type_of? cls
117
- return true
118
- end
119
- end
120
-
121
- return false
122
- end
123
- end
124
-
125
- ##
126
- # Redefines generic boolean type in main namespace.
127
- # @abstract
3
+ # Copyright, 2020, by Samuel G. D. Williams. <http://www.codeotaku.com>
128
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'
129
41
 
130
- 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
131
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,111 +1,90 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: types
3
- version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 0.1.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0
6
5
  platform: ruby
7
- authors:
8
- - "Martin Koz\xC3\xA1k"
9
- autorequire:
6
+ authors:
7
+ - Samuel Williams
8
+ autorequire:
10
9
  bindir: bin
11
- cert_chain: []
12
-
13
- date: 2011-03-01 00:00:00 +01:00
14
- default_executable:
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
17
- name: multitype-introspection
18
- requirement: &id001 !ruby/object:Gem::Requirement
19
- none: false
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: 0.1.0
24
- type: :runtime
25
- prerelease: false
26
- version_requirements: *id001
27
- - !ruby/object:Gem::Dependency
28
- name: abstract
29
- requirement: &id002 !ruby/object:Gem::Requirement
30
- none: false
31
- requirements:
32
- - - ">="
33
- - !ruby/object:Gem::Version
34
- version: 1.0.0
35
- type: :runtime
36
- prerelease: false
37
- version_requirements: *id002
38
- - !ruby/object:Gem::Dependency
39
- name: bundler
40
- requirement: &id003 !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ~>
44
- - !ruby/object:Gem::Version
45
- version: 1.0.0
46
- type: :development
47
- prerelease: false
48
- version_requirements: *id003
49
- - !ruby/object:Gem::Dependency
50
- name: jeweler
51
- requirement: &id004 !ruby/object:Gem::Requirement
52
- none: false
53
- requirements:
54
- - - ~>
55
- - !ruby/object:Gem::Version
56
- version: 1.5.2
57
- type: :development
58
- prerelease: false
59
- version_requirements: *id004
60
- description:
61
- 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:
62
43
  executables: []
63
-
64
44
  extensions: []
65
-
66
- extra_rdoc_files:
67
- - LICENSE.txt
68
- - README.md
69
- files:
70
- - .document
71
- - Gemfile
72
- - Gemfile.lock
73
- - LICENSE.txt
74
- - README.md
75
- - Rakefile
76
- - VERSION
45
+ extra_rdoc_files: []
46
+ files:
77
47
  - lib/types.rb
78
- - types.gemspec
79
- has_rdoc: true
80
- homepage: http://github.com/martinkozak/types
81
- 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:
82
68
  - MIT
83
- post_install_message:
69
+ metadata:
70
+ funding_uri: https://github.com/sponsors/ioquatix/
71
+ post_install_message:
84
72
  rdoc_options: []
85
-
86
- require_paths:
73
+ require_paths:
87
74
  - lib
88
- required_ruby_version: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
75
+ required_ruby_version: !ruby/object:Gem::Requirement
76
+ requirements:
91
77
  - - ">="
92
- - !ruby/object:Gem::Version
93
- hash: -2560325811155880679
94
- segments:
95
- - 0
96
- version: "0"
97
- required_rubygems_version: !ruby/object:Gem::Requirement
98
- none: false
99
- requirements:
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
80
+ required_rubygems_version: !ruby/object:Gem::Requirement
81
+ requirements:
100
82
  - - ">="
101
- - !ruby/object:Gem::Version
102
- version: "0"
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
103
85
  requirements: []
104
-
105
- rubyforge_project:
106
- rubygems_version: 1.5.3
107
- signing_key:
108
- specification_version: 3
109
- 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.
110
90
  test_files: []
111
-
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,12 +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
- gem "abstract", ">= 1.0.0"
6
-
7
- # Add dependencies to develop your gem here.
8
- # Include everything needed to run rake, tests, features, etc.
9
- group :development do
10
- gem "bundler", "~> 1.0.0"
11
- gem "jeweler", "~> 1.5.2"
12
- end
data/Gemfile.lock DELETED
@@ -1,20 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- abstract (1.0.0)
5
- git (1.2.5)
6
- jeweler (1.5.2)
7
- bundler (~> 1.0.0)
8
- git (>= 1.2.5)
9
- rake
10
- multitype-introspection (0.1.0)
11
- rake (0.8.7)
12
-
13
- PLATFORMS
14
- ruby
15
-
16
- DEPENDENCIES
17
- abstract (>= 1.0.0)
18
- bundler (~> 1.0.0)
19
- jeweler (~> 1.5.2)
20
- 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.