Skip to content

Instantly share code, notes, and snippets.

@ahamid
Created February 26, 2011 03:50
Show Gist options
  • Save ahamid/844915 to your computer and use it in GitHub Desktop.
Save ahamid/844915 to your computer and use it in GitHub Desktop.
Variable visibility in Rakefile method
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