Ruby

From Objectif Client Inc
Revision as of 23:14, 12 November 2014 by Nicolas Rollin (talk | contribs)
Jump to navigation Jump to search

First Step

Call Ruby command line

irb

Methode

  • Define a methode "m"

def m(name = "World") puts "Hello Mr #{name.capitalize}!" end

  • Execute

m("nicolas")

Hello Mr Nicolas! => nil