Skip to content

Instantly share code, notes, and snippets.

@dankozlowski
Last active February 26, 2019 19:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dankozlowski/43a1e92d089366946446e651ff1f64de to your computer and use it in GitHub Desktop.
Save dankozlowski/43a1e92d089366946446e651ff1f64de to your computer and use it in GitHub Desktop.
class WantToChatAnswerGetter
attr_accessor :answer
def initialize(answer)
@answer = get_answer(answer)
end
def get_answer(answer)
r = get_string_answer
process_string_answer(r)
end
private
def get_string_answer
puts "Want to chat? y/n"
gets
end
def process_string_answer(answer)
if answer == "y"
puts "What kind of software do you work on?"
else
puts ":/"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment