mixin
A small macro that allows you to specify access level when delegating methods
Installation
Add this to your application's shard.yml
:
dependencies:
mixin:
github: unn4m3d/mixin
Usage
require "mixin"
class Foo
@foo = "ABC"
delegate downcase, to: @foo, access: :protected
delegate strip, to: @foo, access: :private
def to_s
downcase
end
end
Contributing
- Fork it ( https://github.com/unn4m3d/mixin/fork )
- 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 a new Pull Request
Contributors
- unn4m3d - creator, maintainer