Rails
Sunday, January 21, 2018
Ruby if modifier
Syntax
code if condition
Executes
code
if the
conditional
is true.
Example
Live Demo
#!/usr/bin/ruby
$debug
=
1
print
"debug\n"
if
$debug
This will produce the following result −
debug
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment