MethodSource::Expressions
Small extension to method_source. It adds #expressions
to the Proc class. This method returns a hash of expressions defined inside a given Proc/Lambda. Each expression object knows its range of line numbers, its source, and its source_location.
Installation
Add this line to your application's Gemfile:
gem 'method_source-expressions'
And then execute:
$ bundle
Or install it yourself as:
$ gem install method_source-expressions
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request