Skip to content

Instantly share code, notes, and snippets.

View marek2901's full-sized avatar
😉

Marek Dziewit marek2901

😉
View GitHub Profile

Keybase proof

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:

@marek2901
marek2901 / ask_me_anything.rb
Created December 6, 2018 21:32
Lublin IT Ruby 101 Ask Me Anything
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)
@marek2901
marek2901 / hello_world.rb
Created December 6, 2018 21:31
Lublin IT Ruby 101 Hello World
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}"