mixin
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
Repository
mixin
Owner
Statistic
- 0
- 0
- 0
- 0
- 0
- almost 8 years ago
- January 7, 2017
License
MIT License
Links
Synced at
Thu, 07 Nov 2024 07:22:34 GMT
Languages