In C# I can use the #region
keyword to separate blocks of code. Does something like it exist in Ruby?
Short answer: no.
Long answer: There is no code folding or comment style convention enforced by the ruby language. You can use your own convention for grouping methods however and setup your text editor to fold code in a way that works well for you (http://vim.wikia.com/wiki/Folding).
Many wont like this answer, but its simple, and it works
if region1=true
#your code/comments here
end #region1
this is of course, if region1
is not a variable you need at that scope
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With