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
Post a Comment