Skip to content

Instantly share code, notes, and snippets.

@janjiss
Created December 14, 2015 14:04
Show Gist options
  • Save janjiss/8da764d0a33c8a31bce5 to your computer and use it in GitHub Desktop.
Save janjiss/8da764d0a33c8a31bce5 to your computer and use it in GitHub Desktop.
class Notifier
def initialize(input, parser, gateway)
@input = input
@parser = parser
@gateway = gateway
end
def call
parsed_input = parser.parse(input)
gateway.call(parsed_input)
end
attr_reader :parser, :gateway
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment