Permalink
Browse files

Create cache_dir if doesn't exist

  • Loading branch information...
1 parent 9caea78 commit 99e3093b4cea2c44b3a06315660c334523c2ed09 @bcarreno committed Feb 8, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/yahoo_quote/configuration.rb
@@ -1,7 +1,9 @@
module YahooQuote
class Configuration
- def self.cache_dir=(dir)
+ def self.cache_dir=(path)
+ dir = path.to_s
+ Dir.mkdir(dir) unless File.directory?(dir)
@@cache_dir = dir
end

0 comments on commit 99e3093

Please sign in to comment.