In rails, this is a common pattern:
def foo_with_feature
add_feature_to foo_without_feature
end
alias_method_chain :foo, :feature
I want to do this but with an attribute, whose getter method is not defined and will be done on-the-fly with method_missing
, see Why alias_method fails in Rails model
How can I decorate an attribute getter that hasn't been set?