-1

I have:

def is_valid_cool_string(str)
  ...
end

And I want to write something like

is_valid_cool_string("Foobar")
at the bottom of the file to do this. Is there like a main method or something like that?

Thanks!

4

1 に答える 1

0

You don't need anything to make this work. :)

Don't forget to print the result if the method returns something.

puts is_valid_cool_string("Foobar")

or something like

puts "Is valid: #{is_valid_cool_string("Foobar").inspect}"
于 2013-02-05T02:05:45.733 に答える