Return to Snippet

Revision: 40440
at February 2, 2011 06:07 by brandonjp


Initial Code
def my_function( a )
		puts "Hello, #{a}"
		return a.length
	end
	
	len = my_function( "Giraffe" )
	puts "My secret word is #{len} long"

Initial URL


Initial Description


Initial Title
Ruby / Rails - general function syntax example

Initial Tags
rails, ruby, function

Initial Language
Ruby