setsy 0.1.3 → 0.1.5

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: 2dacd629e7912378b03f17f8514e1297edab44e7
4
- data.tar.gz: e593cd92f49a4182ef9f21741564ca8742186e43
3
+ metadata.gz: 80ee1bce812ae3cafaf1ccb9042c6ad779e4252a
4
+ data.tar.gz: 5a160606d6c86b5ad74eb928c49b8c49bcc3559a
5
5
  SHA512:
6
- metadata.gz: 030f2b48eb6a06f16918f56c1c03976e0ca7200e33e5c5412d233612b9f3106c477e9a2c3a5eb405b3ed606d0a96cb04a5aa33d55aae2fd3fa6fa9f98aecb753
7
- data.tar.gz: 22b70c9727bcadd174837df37ef4d6888a8971cbd54482af2a5160c39c14105cac9cc64a6d9d695ea4c29731496b09a83ebdbfbfe8046c05074bf66dc3ee82ec
6
+ metadata.gz: 9ebcb31cca6d1eee2a596430729e6cec0d2c4013ea212f1e6546b83c52e5466c2d6db389b78e98e2b0c2b4c0bcf4de7ccd5241025138899a971cbabb4b69796e
7
+ data.tar.gz: bc7f235b43cee2fad5191354d55db8b94378ccd033ef02ca01d32182e8249dcff52efdcafb9aeb4520b39d1a81049d3cd72fafb6ab838b8e1080be3366963708
@@ -21,7 +21,13 @@ module Setsy
21
21
  result = {}
22
22
  result[:value] = v.is_a?(Hash) ? v[:value] : v
23
23
  result[:default] = result[:value]
24
- result[:value] = set[k] if set[k]
24
+ if set[k]
25
+ if set[k].is_a?(Hash)
26
+ result[:value] = set[k][:value]
27
+ else
28
+ result[:value] = set[k]
29
+ end
30
+ end
25
31
  settings[k] = Attribute.new(result)
26
32
  end
27
33
  new(record, settings, readers)
@@ -43,10 +49,6 @@ module Setsy
43
49
  end
44
50
  end
45
51
 
46
- def [](val)
47
- send(val.to_sym)
48
- end
49
-
50
52
  def attributes
51
53
  keys = @settings.keys
52
54
  keys.push(*methods.select { |m| m.to_s.starts_with?(SETTING_PREFIX) }.map { |m| m.to_s.gsub(SETTING_PREFIX, '') })
@@ -1,3 +1,3 @@
1
1
  module Setsy
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: setsy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Brody
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-09 00:00:00.000000000 Z
11
+ date: 2018-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails