Skip to content

Instantly share code, notes, and snippets.

@kasiapryczek
Created September 13, 2015 13:30
Show Gist options
  • Save kasiapryczek/66b6a70535f651caa7ca to your computer and use it in GitHub Desktop.
Save kasiapryczek/66b6a70535f651caa7ca to your computer and use it in GitHub Desktop.
Ruby
def greeting
puts "Please enter your name:"
name = gets.chomp
puts "Hello " + " " + name
end
greeting
@dogweather
Copy link

Great.

FYI, In Ruby, 2 spaces is the standard indenting style. I.e.:

def greeting
  puts "Please enter your name:"
  name = gets.chomp
  puts "Hello " + " " + name
end
greeting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment