Update engine.rb

I've done a bit more of refactoring.
This commit is contained in:
Nalesso Moreira 2013-05-06 05:27:10 +02:00
parent 14f4097a7b
commit 1f25e16c0e
1 changed files with 7 additions and 4 deletions

View File

@ -35,11 +35,14 @@ module Impressionist
end end
def define_orm_type(str) def define_orm_type(str)
str = str.to_s @orm = matcher(str.to_s)
@orm = str.match(/active_record|mongo_mapper|mongoid|/)
:matched
end end
def matcher(str)
matched = str.match(/active_record|mongo_mapper|mongoid|/)
matched[0]
end
end end
end end