Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elcuervo/dec
https://github.com/elcuervo/dec
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/elcuervo/dec
- Owner: elcuervo
- Created: 2021-03-19T14:48:48.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-19T20:24:51.000Z (almost 4 years ago)
- Last Synced: 2024-11-28T23:28:15.539Z (about 1 month ago)
- Language: Ruby
- Size: 15.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dec
_simple method decorator_## Installation
`gem install dec`
## Example
```ruby
class Something
extend Decdec { |r| r + 2 }
dec { |r| r + 1 }
def one
1
endLOG = -> (r) { puts r.upcase; r }
dec LOG
def two
"two"
end
ends = Something.new
s.one
# => 4s.two
TWO
# => "two"
```