Skip to content

Instantly share code, notes, and snippets.

@radex
Created February 11, 2016 11:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save radex/b425c73afde84d88e4ca to your computer and use it in GitHub Desktop.
Save radex/b425c73afde84d88e4ca to your computer and use it in GitHub Desktop.
Extract function declarations from your Swift project. Just open up `irb` from your project run and paste this:
IO.write 'funcs.txt', (Dir["**/*.swift"] - Dir["{Libraries,Pods}/**/*.swift"]).flat_map { |f| IO.read(f).lines.select { |l| l.include? 'func ' }.map { |l| l.strip } }.join("\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment