Browse files

Raise argument error if Virtus is being included into an unsupported …

…object
  • Loading branch information...
1 parent 57706fa commit 7ce6f995a818bc03d07d4deb07a2654ec28dcfad @solnic committed Jun 8, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/virtus.rb
View
2 lib/virtus.rb
@@ -28,6 +28,8 @@ def self.included(object)
case object
when Class then object.send(:include, ClassInclusions)
when Module then object.extend(ModuleExtensions)
+ else
+ raise ArgumentError, "Object not supported #{object.inspect}"
end
end
private_class_method :included

0 comments on commit 7ce6f99

Please sign in to comment.