ruby-lambdas 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ruby/lambdas/core/strict_mode/disable.rb +1 -9
- data/lib/ruby/lambdas/core/strict_mode/enable.rb +2 -2
- data/lib/ruby/lambdas/numerics.rb +1 -0
- data/lib/ruby/lambdas/numerics/type_error.rb +7 -0
- data/lib/ruby/lambdas/strings.rb +1 -0
- data/lib/ruby/lambdas/strings/type_error.rb +7 -0
- data/lib/ruby/lambdas/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e2a7b9e186dea079aa61cc20eb5b2635a67acbfa0ac712f2907bdba7003a0bb
|
4
|
+
data.tar.gz: 5c5991a70d60ba6bbf7cf186302be5000f637ab85650420098149061c35b96cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccef27684c7244f53d845c1a00b4b1ea23b897f8af5518e6cc324c22286820d4e1d7225e4ceaedfe754ec18bed651298133f14a0b236c203d620f7d972175f6f
|
7
|
+
data.tar.gz: 669a6de05dc29bc1d665c8bbc4c1d4a40885fee74a8bb9412c66b427ff623cda4de26cec841db924cfa191c644adcf4231076ff3ccbf59a82f0258bb7024e41c
|
@@ -6,14 +6,6 @@
|
|
6
6
|
#
|
7
7
|
[:String!, :Numeric!].each do |name|
|
8
8
|
Kernel.remove_method(name) if Kernel.respond_to?(name)
|
9
|
-
end
|
10
|
-
|
11
|
-
module Kernel
|
12
|
-
def String!(data)
|
13
|
-
data
|
14
|
-
end
|
15
9
|
|
16
|
-
|
17
|
-
data
|
18
|
-
end
|
10
|
+
Kernel.module_eval { define_method(name) { |data| data } }
|
19
11
|
end
|
@@ -6,12 +6,12 @@ module Kernel
|
|
6
6
|
def String!(data)
|
7
7
|
return data if data.is_a?(::String)
|
8
8
|
|
9
|
-
raise TypeError
|
9
|
+
raise Strings::TypeError.new(data)
|
10
10
|
end
|
11
11
|
|
12
12
|
def Numeric!(data)
|
13
13
|
return data if data.is_a?(::Numeric)
|
14
14
|
|
15
|
-
raise TypeError
|
15
|
+
raise Numerics::TypeError.new(data)
|
16
16
|
end
|
17
17
|
end
|
data/lib/ruby/lambdas/strings.rb
CHANGED
data/lib/ruby/lambdas/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-lambdas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rodrigo Serradura
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -80,11 +80,13 @@ files:
|
|
80
80
|
- lib/ruby/lambdas/core/strict_mode/enable.rb
|
81
81
|
- lib/ruby/lambdas/numerics.rb
|
82
82
|
- lib/ruby/lambdas/numerics/to_export.rb
|
83
|
+
- lib/ruby/lambdas/numerics/type_error.rb
|
83
84
|
- lib/ruby/lambdas/objects.rb
|
84
85
|
- lib/ruby/lambdas/objects/to_export.rb
|
85
86
|
- lib/ruby/lambdas/strict-mode.rb
|
86
87
|
- lib/ruby/lambdas/strings.rb
|
87
88
|
- lib/ruby/lambdas/strings/to_export.rb
|
89
|
+
- lib/ruby/lambdas/strings/type_error.rb
|
88
90
|
- lib/ruby/lambdas/version.rb
|
89
91
|
- ruby-lambdas.gemspec
|
90
92
|
homepage:
|
@@ -107,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
109
|
- !ruby/object:Gem::Version
|
108
110
|
version: '0'
|
109
111
|
requirements: []
|
110
|
-
rubygems_version: 3.0.
|
112
|
+
rubygems_version: 3.0.2
|
111
113
|
signing_key:
|
112
114
|
specification_version: 4
|
113
115
|
summary: Exposes Ruby object methods as lambdas (functions).
|