Skip to content

Instantly share code, notes, and snippets.

@simonista
Created August 25, 2014 04:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save simonista/5a6b27c1a03a0da53acf to your computer and use it in GitHub Desktop.
Save simonista/5a6b27c1a03a0da53acf to your computer and use it in GitHub Desktop.
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
@Calvinearl
Copy link

Calvinearl commented Jan 29, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment