Created
February 26, 2011 03:50
-
-
Save ahamid/844915 to your computer and use it in GitHub Desktop.
Variable visibility in Rakefile method
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
target=ENV['TARGET'] || "whatever" | |
def helpful_helper(a) | |
# do something extremely helpful | |
puts "Visible? #{target}" | |
end | |
task :default do | |
puts "My target is #{target}" | |
helpful_helper("yo") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment