Vanilla 1.1.5 is a product of Lussumo. More Information: Documentation, Community Support.
Help keep Vanilla free:puts "This is a string"Object.puts("This is a string")strint_var = "String".chop()"String\n".chomp!string_var = "String\n".chompdef +
here is my code
enddef __getadd__:
here is my code
end
class Test
def Test.method
my code here
end
end
for x in array:
do whateverarray.each { do whatever }In Python you might say:The python method is unquestionably clearer to someone who is unfamiliar with this sort of construct. It builds on knowledge of the "for" loop, which practically every major language (ruby and python included) have.
for x in array:
do whatever
Where as the "way" of doing things in Ruby is more along the lines of:
array.each { do whatever }
array.each{|x| do something}
ary = [1, 2]
for item in ary
puts item
end
1 to 10 of 10