notahat-machinist 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/machinist.rb +3 -2
  2. metadata +1 -1
data/lib/machinist.rb CHANGED
@@ -49,8 +49,9 @@ module Machinist
49
49
  end
50
50
 
51
51
  class Lathe
52
- def initialize(klass, attributes)
53
- @object = klass.new(attributes)
52
+ def initialize(klass, attributes = {})
53
+ @object = klass.new
54
+ attributes.each {|key, value| @object.send("#{key}=", value) }
54
55
  @assigned_attributes = attributes.keys.map(&:to_sym)
55
56
  end
56
57
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notahat-machinist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Yandell