supa 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/supa/command.rb +2 -5
- data/lib/supa/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89cc30c7737fcae1910d74529b721b58c082abbf
|
4
|
+
data.tar.gz: 4f76b510e84e0fb230decb8df951ab0f646cc022
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d4cd9188e81f3de4c28ec45424e09411b6e20d3450215153263c20e9c61d4b463b2da3a6d953530080678efd7914387b245f3c22bb53f9438b5e9a9302e0c96
|
7
|
+
data.tar.gz: 7c57a67ca5d224cccbf9f7a59f889a7f73daf041c454b21372817a6e26cb4a717310ca6447b3f37b83868acc07d5e26c0ab79cf276f8cc6d69471a41128621db
|
data/lib/supa/command.rb
CHANGED
@@ -16,13 +16,10 @@ module Supa
|
|
16
16
|
attr_reader :context, :tree, :name, :options, :block
|
17
17
|
|
18
18
|
def get_value
|
19
|
-
|
20
|
-
when Proc
|
19
|
+
if options[:getter].is_a?(Proc)
|
21
20
|
context.instance_exec(&options[:getter])
|
22
|
-
when Hash
|
23
|
-
context[name]
|
24
21
|
else
|
25
|
-
context.send(name)
|
22
|
+
context.is_a?(Hash) ? context[name] : context.send(name)
|
26
23
|
end
|
27
24
|
end
|
28
25
|
end
|
data/lib/supa/version.rb
CHANGED