attribute_cache 0.2.0 → 0.2.1

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
  SHA256:
3
- metadata.gz: 66a21b6648b4cfdfd46b0a30e6f98e574638b0b7fefe09e13b9cf1d566a6c358
4
- data.tar.gz: e31fae03845ef5bb5d0b8144b502539a299258d7fecf863420ab246d9444e2a3
3
+ metadata.gz: a461cfe2ed010a9b5934d7f3638d7506342e791b1fa6e6fca2e26d16d16aaca3
4
+ data.tar.gz: 379500bd4bf3b841a5e5f948bb7fbdf48129bf4218395e6f636774b5c2c134a3
5
5
  SHA512:
6
- metadata.gz: 8b7b7e01e7e9d516b76be4c1b55cc28ecd7a224912174a13ce0b8c7ea814398a51978e5142560f721850883debc2c9dee814677e6aa554dc34e3ac8bc90248fa
7
- data.tar.gz: 49133b0d6ebb635ca0676b6526b560f4c94cd806bbc4c6abfe47b469d414394c3f78bb8cb2605cc11e273cfa3b4cec8eaf8936bcaeb49301d8ff80980b30c51c
6
+ metadata.gz: d2b9e15cffd9de958d4985cb00ddf1c0d26108cdd6024020b391d47f411c789769192225084ac3573e075485dc8b283b3451a28f4a0ec69f7632209e720afa97
7
+ data.tar.gz: 73201dbe32e5a13b3a4542311450a40514dad1750ef9727724d22f246b18cf5994c0af74e12206c91a44def83c798c4b62355e1e89d1acfb57cc02a9d4395234
@@ -59,6 +59,13 @@ module AttributeCache
59
59
  attr_cache.value(self, save: save, keep_blanks: keep_blanks)
60
60
  end
61
61
  end
62
+
63
+ def self.attribute_store(name, options = {}, &block)
64
+ options.default! :cache_on_create, true
65
+ options.default! :attribute_prefix, 'stored'
66
+
67
+ attribute_cache(name, options, &block)
68
+ end
62
69
  end
63
70
 
64
71
  private
@@ -1,3 +1,3 @@
1
1
  module AttributeCache
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: attribute_cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jacob Lockard