1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
# procto
[][gem]
[][travis]
[][gemnasium]
[][codeclimate]
[][coveralls]
[gem]: https://rubygems.org/gems/procto
[travis]: https://travis-ci.org/snusnu/procto
[gemnasium]: https://gemnasium.com/snusnu/procto
[codeclimate]: https://codeclimate.com/github/snusnu/procto
[coveralls]: https://coveralls.io/r/snusnu/procto
## Usage
```ruby
require 'procto'
class Greeter
include Procto.call
def initialize(text)
@text = text
end
def call
"Hello #{text}"
end
end
Greeter.call('world') # => "Hello world"
class Printer
include Procto.call(:print)
def initialize(text)
@text = text
end
def print
"Hello #{text}"
end
end
Printer.call('world') # => "Hello world"
```
## Credits
* [snusnu](https://github.com/snusnu)
* [mbj](https://github.com/mbj)
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
## Copyright
Copyright © 2013 Martin Gamsjaeger (snusnu). See [LICENSE](LICENSE) for details.
|