Is there any such thing as static variables in Ruby that would behave like they do in C functions?
Here\'s a quick example of what I mean. It prints \"6\\n7\\n\" to the
Similar to nicooga's answer but more self-contained:
def some_method @var ||= 0 @var += 1 puts @var end