Skip to content

Instantly share code, notes, and snippets.

@Ahnita Ahnita/program.rb
Last active Aug 29, 2015

Embed
What would you like to do?
Ruby
def greeting #here we say def to define a method and put the name of our method
puts "Please enter your name:"
name = gets.chomp
puts "hello" + " " + name #here's the code inside our method
end #and here we end or close our method
greeting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.