lib/shaped.rb in shaped-0.6.3 vs lib/shaped.rb in shaped-0.6.4
- old
+ new
@@ -25,9 +25,10 @@
else
shape_descriptions.first
end
case shape_description
+ when Shaped::Shape then shape_description
when Hash then Shaped::Shapes::Hash.new(shape_description)
when Array then Shaped::Shapes::Array.new(shape_description)
when Class then Shaped::Shapes::Class.new(shape_description, validation_options)
else
if shape_description.respond_to?(:call)