I hereby claim:
- I am marek2901 on github.
- I am vb_3333 (https://keybase.io/vb_3333) on keybase.
- I have a public key ASDOaJA3aZ0cmRhKYF5SS_NGgfgIGSlFJ32wvZf5GV5B9Ao
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| class AskForAnything | |
| def method_missing(method_name) | |
| if /^for_(?<questions>.*)/ =~ method_name | |
| answers = questions.split('_').map do |question| | |
| if %w(and or).include? question | |
| next | |
| end | |
| puts "What is your #{question}" | |
| { question => gets.chomp } | |
| end.compact.reduce({}, :merge) |
| puts "Hello world" | |
| # => Hello world | |
| # | |
| puts "1 + 1 is #{1 + 1}" | |
| # => 1 + 1 is 2 | |
| puts "Type smth" | |
| answer = gets.chomp | |
| puts "You typed #{answer}" |