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.
- data/lib/machinist.rb +3 -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
|
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
|
|