More cleanup

This commit is contained in:
Jaiden Mispy 2014-12-05 22:57:32 +11:00
parent 1977445b1c
commit 822f5e4c6c
13 changed files with 144 additions and 14884 deletions

View file

@ -39,9 +39,14 @@ module Ebooks
end
end
def initialize(username, path, client=nil)
def initialize(username, path=nil, client=nil)
@username = username
@path = path || "#{username}.json"
@path = path || "corpus/#{username}.json"
if File.directory?(@path)
@path = File.join(@path, "#{username}.json")
end
@client = client || make_client
if File.exists?(@path)