rfunk 1.5.0 → 1.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/rfunk/attribute/error_checking.rb +1 -1
- data/lib/rfunk/attribute/function.rb +11 -9
- data/lib/rfunk/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e67de9a131f2f676ae3367d50eb098fa626eac4
|
4
|
+
data.tar.gz: 4c2f32f6690680e5be67c0055db43b55582cc251
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a55443e74d9bb2e34741068a582c6dcc1ade648e44b5af15a26d2b12f3dc8906d2bb5857f9190bc46a30e99846933592c848e83c92251eb4a4e7ad7f631f2e41
|
7
|
+
data.tar.gz: 82e9ba0e3218b83bc67870ecc44d01ac0e5d7e1205cd546a4e5a378da30cd1fdce65b2c2c1ab924aa29eabed82a12dd31bd8e2d394b0d74f26052e712b3a4c7e
|
@@ -24,7 +24,7 @@ module RFunk
|
|
24
24
|
|
25
25
|
def raise_immutable(options, variable)
|
26
26
|
keys = options.keys.select { |k| variable.key?(k) }
|
27
|
-
message = "Could not
|
27
|
+
message = "Could not rebind a value '#{keys}', because they are immutable."
|
28
28
|
raise RFunk::ImmutableError, message if keys.any?
|
29
29
|
end
|
30
30
|
|
@@ -9,19 +9,21 @@ module RFunk
|
|
9
9
|
@variables = {}
|
10
10
|
end
|
11
11
|
|
12
|
-
def
|
13
|
-
if
|
14
|
-
|
15
|
-
self.variables = options
|
16
|
-
else
|
17
|
-
error_checking.raise_immutable(options, variables)
|
18
|
-
self.variables = variables.merge(options)
|
19
|
-
end
|
12
|
+
def val(options)
|
13
|
+
if variables.empty?
|
14
|
+
self.variables = options
|
20
15
|
else
|
21
|
-
|
16
|
+
error_checking.raise_immutable(options, variables)
|
17
|
+
self.variables = variables.merge(options)
|
22
18
|
end
|
23
19
|
end
|
24
20
|
|
21
|
+
def value(options)
|
22
|
+
RFunk.some(RFunk.some(variables)[options])
|
23
|
+
end
|
24
|
+
|
25
|
+
[:let].each { |m| alias_method m, :val }
|
26
|
+
|
25
27
|
def assert(&_)
|
26
28
|
return true if yield
|
27
29
|
raise RFunk::AssertionError
|
data/lib/rfunk/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rfunk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Falkowski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ice_nine
|