- Primeiro slash command (calculadora) que fizemos: https://gist.github.com/serradura/ef3885d6ba736757150c
- Projeto de referência: https://github.com/samg/timetrap
- https://api.slack.com/slash-commands
- Ruby Explained: Procs, blocks and lambdas: http://www.eriktrautman.com/posts/ruby-explained-blocks-procs-and-lambdas-aka-closures
- Diff between block, procs and lambdas: http://awaxman11.github.io/blog/2013/08/05/what-is-the-difference-between-a-block/
- RubyMonk with running codes: https://rubymonk.com/learning/books/4-ruby-primer-ascent/chapters/18-blocks/lessons/64-blocks-procs-lambdas
https://en.wikipedia.org/wiki/Template_method_pattern
Exemplo em coffeescript:
class Template
constructor: (@name) ->
greet: -> throw "NotImplementedError"
command = new Template("foo")
command.greet()
class Polite extends Template
greet: -> "Hello #{@name}"
command = new Polite("foo")
alert command.greet()
Ruby Explained: Procs, blocks and lambdas - http://www.eriktrautman.com/posts/ruby-explained-blocks-procs-and-lambdas-aka-closures
Diff between block, procs and lambdas - http://awaxman11.github.io/blog/2013/08/05/what-is-the-difference-between-a-block/
RubyMonk with running codes - https://rubymonk.com/learning/books/4-ruby-primer-ascent/chapters/18-blocks/lessons/64-blocks-procs-lambdas (edited)