active_model_attributes 1.4.0 → 1.5.0

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: 1b52785770a010678b6294e39209216e528883042b84d60ec10326fa94f3555e
4
- data.tar.gz: 0c624fed894aee6ba9ed4ff19c0f02caf1eaa515e63c09f045dec2b271ac3559
3
+ metadata.gz: cfb04d34795093fbccd50bd3b4af509210edb22b041689c30b9c08d3371495f2
4
+ data.tar.gz: 7880d7fb17d90a86b1dc5b05575b0952e38188b397ca2ce491ffdf0f3d805981
5
5
  SHA512:
6
- metadata.gz: a5641a65feb0260d15ae4b9e069429b27ff32e74f80c9f96a6f2b072543d4090c873e669ace16cac5e8af629f4e2f2487ae8ed504a539dca46bf26d821d6a59d
7
- data.tar.gz: f5eb0699d4d266a4b5615d834899e14b543598eb191d1be07b647586e85a919e6e3b89c39d82c954e9a752eb4847136600bab3d39eacf0a2fbe614eeb8b47b18
6
+ metadata.gz: aad4717e6160598be72ebc9217ca0b76e2c0ec6f13c0e843c266c9951ecbb102a2fdd3fde1eacf2a26a5659345c5f31abd0c154df6d5ff5e8a39ee4d65a18175
7
+ data.tar.gz: ba5bb7cc3cef03434c7f500daa979ca47652daa21d36999a9b2d816b4ff419e5e7cda2429531ba14aef08a3496340a5e63217601a4152b02ab9845f9fc589206
data/Changelog.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 1.5.0
6
+
7
+ - [ENHANCEMENT] Initialize field with default value upon read by @jughead
8
+
5
9
  ## 1.4.0
6
10
 
7
11
  - [FEATURE] Add methods for introspection of types and attributes by @fsateler
@@ -30,7 +30,7 @@ module ActiveModelAttributes
30
30
  define_method name do
31
31
  return instance_variable_get("@#{name}") if instance_variable_defined?("@#{name}")
32
32
  return if provided_default == NO_DEFAULT_PROVIDED
33
- provided_default.respond_to?(:call) && provided_default.call || provided_default
33
+ instance_variable_set("@#{name}", provided_default.respond_to?(:call) && provided_default.call || provided_default)
34
34
  end
35
35
  end
36
36
  include wrapper
@@ -1,3 +1,3 @@
1
1
  module ActiveModelAttributes
2
- VERSION = "1.4.0"
2
+ VERSION = "1.5.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_model_attributes
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karol Galanciak
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-03 00:00:00.000000000 Z
11
+ date: 2019-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler