clavatar 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/clavatar.rb +2 -1
  3. data/lib/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8fbb3f61f81e4c9cc49182ca5ac6f2b6680cf005
4
- data.tar.gz: 7c1c21fc5bd31874c002a8a8303b567b304e2fba
3
+ metadata.gz: 88d4920ca6618129a9deb772508333195dd74812
4
+ data.tar.gz: 365d92eab219c7ffd2189282f88eaae699eabfcd
5
5
  SHA512:
6
- metadata.gz: 4354d16304659fff8bff453692ea09f08393191aa465bdbeb3e0bb0f0f2238ca9766f5861d74596b42a349a423d63860b6017aaebf942c1fbcd9c0ced0def301
7
- data.tar.gz: 9cf359755e58ec5c95273501396b8076a912cd68d18966452b34efe1cbb980723b46f43b03be7f8f20ac3281bfa6487fa623f590457ad1947efb2e716a6d0a47
6
+ metadata.gz: 14fa92cec7052596817610abefa50ec188ea167892268df0d59aca32d7fa1105918e6c03c770a6a15e13e1bee040ca0965b1f54e6ccbc9b755de30836f702b13
7
+ data.tar.gz: 4fd9a73bd0c9a1bd73f4297252872058ab2f6b6b3da7cf06ee72805e8c1c1b21d3799d138afe3cc96628ea09cfb81e4484fa25457b48331e370210d410c74a62
data/lib/clavatar.rb CHANGED
@@ -2,7 +2,8 @@ require 'ostruct'
2
2
 
3
3
  # Clavatar module
4
4
  module Clavatar
5
- def self.cast(hash, klass, example)
5
+ def self.cast(hash, example)
6
+ klass = example.class
6
7
  accessible_attr = []
7
8
  example.instance_variables.each do |attr|
8
9
  attr = attr.to_s.sub('@', '').to_sym
data/lib/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # Clavatar gem version
2
2
  module Clavatar
3
- VERSION = '0.0.5'
3
+ VERSION = '0.0.6'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clavatar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Han
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-13 00:00:00.000000000 Z
11
+ date: 2016-06-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Apply a hash into a Ruby class and return an instance of it.
14
14
  email: hex0cter@gmail.com