Hello Person in a function
examples/functions/hello_person.rb
def hello_person(name) puts "Hello #{name}!" end puts "Before" hello_person "Foo" hello_person("Bar") puts "After"
Before Hello Foo! Hello Bar! After
def hello_person(name) puts "Hello #{name}!" end puts "Before" hello_person "Foo" hello_person("Bar") puts "After"
Before Hello Foo! Hello Bar! After