Ruby: Difference between revisions

From Objectif Client Inc
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
[Category:Ruby]
[[Category:Ruby]]
[Category:Code]
[[Category:Code]]
== First Step ==
== First Step ==
=== Call Ruby command line ===
=== Call Ruby command line ===

Revision as of 23:18, 12 November 2014

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