Implement GithubGistFormula in a more natural way

This commit is contained in:
Jack Nagel 2014-12-26 01:31:56 -05:00
parent 7afe1ed67a
commit c50fdbd139

View File

@ -9,10 +9,9 @@ end
# See browser for an example
class GithubGistFormula < ScriptFileFormula
def initialize(*)
url = self.class.stable.url
self.class.stable.version(File.basename(File.dirname(url))[0,6])
def self.url(val)
super
version File.basename(File.dirname(val))[0, 6]
end
end