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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ba3a8a94ff1fa36f744351560f69e5d5c4dc7a9e
4
- data.tar.gz: 232b0f9ffa27e2837450cdf1da7d02b36badcb4c
3
+ metadata.gz: 89cc30c7737fcae1910d74529b721b58c082abbf
4
+ data.tar.gz: 4f76b510e84e0fb230decb8df951ab0f646cc022
5
5
  SHA512:
6
- metadata.gz: 91714b9bb1e572777812aee2545f8f8ba8336cbd2ce5153acbea66fd0a6aed572f5ed826d68e13cdf87bf5f623e3d713771b38ab57f2c17417551d525f89decd
7
- data.tar.gz: 10f0f87d38c68477550f664a5dc6533a739cf5a23b8664b269b9184fdd825c3dcf2d0b8a890b51cf8af91790e20a1039d9b651cf59d69bec2302165985bca0e4
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
- case options[:getter]
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
@@ -1,3 +1,3 @@
1
1
  module Supa
2
- VERSION = "0.1.3"
2
+ VERSION = '0.1.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: supa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Das