ruby - class_eval and open classes -


i using spree, , spree has class called order looks like:

module spree   class order     # class definition.   end end 

in own app, have been customising order so:

spree::order.class_eval   # customisations end 

my question is, can this:

module spree   class order     # own customisations.   end end 

any downsides this? essentially, want avoid using class_eval.

benjamin, reopen class not inform (but class_eval raise error) if existing class not exist or not loaded.

but if have test coverage, reopen class should safe guess?


Comments

Popular posts from this blog

google app engine - 403 Forbidden POST - Flask WTForms -

Android layout hidden on keyboard show -

Parse xml element into list in Python -