settingson 1.2.11 → 1.2.12

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: 5951c4e091e52895e3b2e1f743e7a51a373d84f4
4
- data.tar.gz: fcdb9ae78b9134d7efe02ed1f9d901c881b63520
3
+ metadata.gz: b45e60730f89bf47e5758708491459f63e10ba85
4
+ data.tar.gz: 840ad3c212a9499cb5b3d01abae616eb35b3eca5
5
5
  SHA512:
6
- metadata.gz: d8a643dff5d5fd1d42ad2f6ed9063c8d1977504be354548734c241badb5cb00049df6a6a4312884bf272743f5c1513fee77c1e69853c90826c36f4b4d1a60b29
7
- data.tar.gz: a60397b60143f7155f53a92720d886ff7abdb845e62518d093f3598ac7e9a9cffe74dbdfc8d8d186e467c60a32148b7d64d9a8ede894ffd6076b4ba439664957
6
+ metadata.gz: 244d1072fced9f3eac923f2ce3e7c2abe34eb0fe1adc05a834264493b459a2c5c52c640e508c8f101118cf1a62388eac88f57882b1839e6df72c60336561f078
7
+ data.tar.gz: 27a139bbb354c976aec63f7b3ba36f5cd741ae60d804cb24acad9ac1d70c99ff0d796a900f7e305ba9fcc316f623c0c24b279eb9e45b564375698c84d9e56746
@@ -26,6 +26,10 @@ module Settingson::Base
26
26
  else
27
27
  self.class.create(key: @settingson, value: args.first.to_yaml)
28
28
  end
29
+ when /(.+)\?$/ #
30
+
31
+ @settingson = "#{@settingson}.#{$1}"
32
+ self.class.find_by(key: @settingson).present?
29
33
 
30
34
  else # getter
31
35
 
@@ -55,6 +59,10 @@ module Settingson::Base
55
59
  else
56
60
  create(key: @settingson, value: args.first.to_yaml, settingson: @settingson)
57
61
  end
62
+
63
+ when /(.+)\?$/ #
64
+
65
+ find_by(key: $1).present?
58
66
 
59
67
  else # getter
60
68
 
@@ -1,3 +1,3 @@
1
1
  module Settingson
2
- VERSION = "1.2.11"
2
+ VERSION = "1.2.12"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: settingson
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.11
4
+ version: 1.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - dan