Skip to content

Instantly share code, notes, and snippets.

@BlakeWilliams
Created April 28, 2015 01:24
Show Gist options
  • Save BlakeWilliams/542bd2000886a89b74cf to your computer and use it in GitHub Desktop.
Save BlakeWilliams/542bd2000886a89b74cf to your computer and use it in GitHub Desktop.
class RecipeCreator
attr_reader :recipe
def initialize(params)
@recipe = Recipe.new(params)
end
def save
saved = recipes.save
if saved
trigger_webhook
send_email
end
saved
end
private
def trigger_webhook
# Logic goes here
end
def send_email
# Logic goes here
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment