I have a class Foo with a method bar. How do I override foo's bar with
Foo.instance_eval do
def bar
#do something a little different
end
end
whats to be overridden:
module Lorem
class Foo
def bar
# do something
end
end
end
instance_eval
needs to be used, class_eval
works with overriding but doesnt keep the context