watson-ruby
watson-ruby copied to clipboard
More "Ruby" way of going to next line? [lib/watson/config.rb]
filename : lib/watson/config.rb line # : 261 tag : review md5 : eb83bcdeb3e78f7c5783b6e1008ae470
# [review] - More "Ruby" way of going to next line?
next
end
# [review] - Use if with match so we can call next on the line reading loop
# Tried using match(){|_mtch|} as well as do |_mtch| but those don't seem to
# register the next call to the outer loop, so this way will do for now
# Regex on line to find out if we are in a new [section] of
# config parameters. If so, store it into section var and move
# to next line
_mtch = _line.match(/^\[(\w+)\]/)
if _mtch
debug_print "Found section #{ _mtch[1] }\n"
_section = _mtch[1]
next