# Imagine we have this logic on stackoverflow: # A user can post a question on a stackoverflow, after posting an email notification is sent to # all users have interest in the question topic, a post is shared on the user profile with a link to the question he posted class SOFQuestionNotifier def initialize(question) @question = question end def save @question.save && post_to_wall && queue_emails end private def post_to_wall end def queue_emails end end # app/controllers/questions_controller def create @question = SOFQuestionNotifier.new(Question.new(params[:question])) if @question.save # Success else # Error end end