Last active
August 29, 2015 14:02
-
-
Save JSchaenzle/835c1849d7d7382f7af4 to your computer and use it in GitHub Desktop.
Ruby ERB inline
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
def foobar | |
hash = `git show --pretty=%h`.strip.upcase | |
contents = <<-eof | |
#ifndef VERSION_INFO_H | |
#define VERSION_INFO_H | |
#define CURRENT_GET_HASH "#{hash}" | |
#endif | |
eof | |
puts contents | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment