Created
August 25, 2014 04:30
-
-
Save simonista/5a6b27c1a03a0da53acf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
linere = /(\S+):(\d+):\s*(.*)(Setting\.get(_or_set)?\(.*(\))?)(.*)/ | |
settingre = /['"](\S+)['"], (.*)\)/ | |
File.readlines('settings.txt').each do |line| | |
if linematch = line.match(linere) | |
all, filename, linenumber, before, setting, or_set, after = linematch.to_a | |
if settingmatch = setting.match(settingre) | |
all, name, default = settingmatch.to_a | |
puts "#### #{name}\n* default: `#{default}`\n* usage: `#{before}#{setting}#{after}`\n* location: `#{filename}:#{linenumber}`\n\n" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
having to go to my help resources for some help and my instructor Mrs. Dickens . I having a hard time with the introduction to computers. And login in to my canvas.