Update engine.rb

I've done a bit more of refactoring.
This commit is contained in:
Nalesso Moreira committed 2013-05-06 05:27:10 +02:00
1 parent 14f4097a7b
commit 1f25e16c0e
1 file changed
+7 -4
+7 -4
View File
@@ -35,11 +35,14 @@ module Impressionist
end
def define_orm_type(str)
str = str.to_s
@orm = str.match(/active_record|mongo_mapper|mongoid|/)
:matched
@orm = matcher(str.to_s)
end
def matcher(str)
matched = str.match(/active_record|mongo_mapper|mongoid|/)
matched[0]
end
end
end