Last active
February 26, 2019 19:50
-
-
Save dankozlowski/43a1e92d089366946446e651ff1f64de to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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