active_house 0.2.2 → 0.3.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
  SHA1:
3
- metadata.gz: 82c05801fc7ad814630b97ef96b98266eb55878e
4
- data.tar.gz: 884f6a16ba8a523068bceaf636e22c62ca73861f
3
+ metadata.gz: 66cbd9730bdc57707ccb5173e7e6fea1cb56568c
4
+ data.tar.gz: 4400a745fa25c0deda6feb6a7473457ee770f2ef
5
5
  SHA512:
6
- metadata.gz: eec19aa3942c2980ce9d776977d4f174a9e66712b8410b753705673296c320573b801bc7d1f192891e4e7b81e23a1b8d48428ca66c23f17475b9cba5ef798ba1
7
- data.tar.gz: 5e88fa243733382fe2d0c28cc61311bb9428b89f2e0587b6e6755e482132ed3c308fce7b2fe9269a169d68ddd5e77c1bcfafbaee39ad214a8d4fbf48cffa2bf1
6
+ metadata.gz: c3b48fb5b14a6a97d0162c8d5317c92a2c3a28f8f485bdbf80067dacb6cf4b0ea5b5dd11e0dbda56d34fd48c794a126680d0e4df817a2c3b1be7c97a8af04beb
7
+ data.tar.gz: 01569ba0b57269f5aeaae179d34b2dd0fe40d85525b277ae7f967267d37896f07092f44d5965d16be95cbb2a048bdd9ef2fe7cda52204b241e7bbf45ba912e3c
@@ -26,6 +26,8 @@ module ActiveHouse
26
26
  end
27
27
 
28
28
  def set_attribute(name, value)
29
+ opts = _attribute_opts.fetch(name, {})
30
+ value = opts[:cast].call(value) if opts[:cast]
29
31
  @_attributes[name] = value
30
32
  end
31
33
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveHouse
2
- VERSION = '0.2.2'.freeze
2
+ VERSION = '0.3.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_house
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Talakevich
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-04 00:00:00.000000000 Z
11
+ date: 2019-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel