Created
September 18, 2018 15:16
-
-
Save paneq/f5dcdec250764de0cab1af5d86812cf7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyCommandHandler | |
def initialize | |
make_threadsafe_by_stateless | |
end | |
def call(cmd) | |
local_var = cmd.something | |
output(local_var) | |
end | |
private | |
def make_threadsafe_by_stateless | |
freeze | |
end | |
def output(local_var) | |
puts(local_var) | |
end | |
end | |
CMD_HANDLER = MyCommandHandler.new |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment