Provide a `explain` (or `binding.explain`) method
st0012 opened this issue · 0 comments
st0012 commented
Asking users to type explain <expr>
in terminal while the expression is likely already written in the code doesn't seem to convenient. So perhaps we can provide a helper like
# some code
explain { foo.bar }
which will:
- Read the line to get the
foo.bar
expression - Open an IRB console at the location
- Perform
explain foo.bar
command underneath as if it's typed by the user - Print the output