This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

idiomatic ruby (tm)

  • Loading branch information...
myfreeweb committed Jul 4, 2012
1 parent c41fadc commit ac8e68c57f44c3d27ad2a5fd1eb5e86e54f82fdc
Showing with 4 additions and 4 deletions.
  1. +4 −4 app.rb
View
8 app.rb
@@ -132,7 +132,7 @@ def wikify(page)
end
db_session.mode=(:dropbox)
root = db_session.list("/")
- for entry in root
+ root.each do |entry|
if entry.directory? and entry.path == "/" + @user.folder then folder = entry end
end
if not folder then
@@ -145,7 +145,7 @@ def wikify(page)
end
pages = db_session.list(@user.folder)
@pages = []
- for entry in pages
+ pages.each do |entry|
if entry.path == "/#{@user.folder}/#{page}" then reqpage = entry end
@pages.push(entry.path.gsub("/#{@user.folder}/", ""))
end
@@ -167,7 +167,7 @@ def wikify(page)
end
db_session.mode=(:dropbox)
root = db_session.list("/")
- for entry in root
+ root.each do |entry|
if entry.directory? and entry.path == "/" + user.folder then folder = entry end
end
if not folder then db_session.create_folder(user.folder) end
@@ -187,7 +187,7 @@ def wikify(page)
end
db_session.mode=(:dropbox)
root = db_session.list("/")
- for entry in root
+ root.each do |entry|
if entry.directory? and entry.path == "/" + user.folder then folder = entry end
end
if not folder then db_session.create_folder(user.folder) end

0 comments on commit ac8e68c

Please sign in to comment.