A mixin which separates method definitions by argument types, effectively allowing C++ or Java style overloading.
Add this line to your application's Gemfile:
gem 'detach'
And then execute:
$ bundle
Or install it yourself as:
$ gem install detach
Include the module
include Detach
Then declare your overloaded methods
taking['String','Numeric']
def foo(a,b)
end
taking['Object']
def foo(a)
end
- 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