Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Documenting cache_file.

  • Loading branch information...
commit affb151d19e57448823d2688be36ad642878529b 1 parent e754fc5
@jqr authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  runkeeper.rb
View
2  runkeeper.rb
@@ -67,6 +67,8 @@ def self.open_url_and_cache_activities_page(user_name)
Nokogiri::HTML(raw_html)
end
+ # Stores contents at path, completely overwriting the previous
+ # file. Automatically creates any directories needed.
def self.cache_file(path, contents)
FileUtils.mkdir_p(File.dirname(path))
File.open(path, 'w') do |file|
Please sign in to comment.
Something went wrong with that request. Please try again.