Ruby: Difference between revisions

From Objectif Client Inc
Jump to navigation Jump to search
No edit summary
No edit summary
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
== First Step ==
[[Category:Ruby]]
=== Call Ruby command line ===
[[Category:Code]]
<pre>irb</pre>


=== Methode ===
==[[Ruby First Step]]==
* Define a methode "m"
==[[Ruby Installation]]==
def m(name = "World")
==[[Ruby Le Language]]==
puts "Hello Mr #{name.capitalize}!"
==[[Ruby Rail First Step]]==
end
 
* Execute
m("nicolas")
 
Hello Mr Nicolas!
=> nil

Latest revision as of 18:59, 13 November 2014