setsy 0.1.2 → 0.1.3

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: 2f86afe01e5815478a66c597d623ec4e4e5a94cf
4
- data.tar.gz: b827177acaa78e096b2ed40dc2eca1b5cc98a398
3
+ metadata.gz: 2dacd629e7912378b03f17f8514e1297edab44e7
4
+ data.tar.gz: e593cd92f49a4182ef9f21741564ca8742186e43
5
5
  SHA512:
6
- metadata.gz: 43240b7e3d6d046d7208c09ed5e15929a8927302eac095bbfc9de9c6c02ae44b91b1a46e39e7f2b01e491b9e8b8dcbeaa0b98c069e55b9bc9fd86d74b1eebf7c
7
- data.tar.gz: c753a8c1290e7e835a084e6def33bce9b88dc63e19f71d1af1430c429a2d6cfc108088884c990cd2ab0f8a3167bf16b73d53cf3cbc0852a690add92bbd57e9ba
6
+ metadata.gz: 030f2b48eb6a06f16918f56c1c03976e0ca7200e33e5c5412d233612b9f3106c477e9a2c3a5eb405b3ed606d0a96cb04a5aa33d55aae2fd3fa6fa9f98aecb753
7
+ data.tar.gz: 22b70c9727bcadd174837df37ef4d6888a8971cbd54482af2a5160c39c14105cac9cc64a6d9d695ea4c29731496b09a83ebdbfbfe8046c05074bf66dc3ee82ec
data/README.md CHANGED
@@ -6,6 +6,10 @@ Settings for your classes. Depends on ActiveRecord, ActiveModel, and ActiveSuppo
6
6
 
7
7
  This is not very tidy as it is. But it's battle-tested.
8
8
 
9
+ ## You want this if...
10
+
11
+ You want this if you don't want to have a zillion columns per model to manage your settings.
12
+
9
13
  ## Installation
10
14
 
11
15
  Add this line to your application's Gemfile:
@@ -43,6 +43,10 @@ module Setsy
43
43
  end
44
44
  end
45
45
 
46
+ def [](val)
47
+ send(val.to_sym)
48
+ end
49
+
46
50
  def attributes
47
51
  keys = @settings.keys
48
52
  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.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: setsy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Brody