Permalink
Browse files

Extract Decorator Step Seven

* Inline method
  • Loading branch information...
jferris committed Feb 21, 2013
1 parent 876ec97 commit 77b22c5ae57db04f219cb8ced7d3f38838ef8a42
Showing with 1 addition and 5 deletions.
  1. +1 −5 example_app/app/models/unanswered_question_hider.rb
@@ -8,18 +8,14 @@ def initialize(summarizer, user)

def summarize(question)
if hide_unanswered_question?(question)
hide_answer_to_question(question)
NO_ANSWER
else
@summarizer.summarize(question)
end
end

private

def hide_answer_to_question(question)
NO_ANSWER
end

def hide_unanswered_question?(question)
@user && !question.answered_by?(@user)
end

0 comments on commit 77b22c5

Please sign in to comment.