Amenable
Removes exessive parameters from function calls.
require 'amenable'
class Dog
using Amenable
amenable def bark(n = 1)
([ :woof ] * n).join(" ")
end
end
Dog.new.bark
> "woof"
Dog.new.bark(2)
> "woof woof"
Dog.new.bark(2, 3, 4, foo: 5)
> "woof woof"
Contributing
Yes please :)
- Fork it
- Create your feature branch (
git checkout -b my-feature
) - Ensure the tests pass (
bundle exec rspec
) - Commit your changes (
git commit -am 'awesome new feature'
) - Push your branch (
git push origin my-feature
) - Create a Pull Request