Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Commit

Permalink
Prettier output for commands list
Browse files Browse the repository at this point in the history
Just a bit prettier
  • Loading branch information
allansideas committed Nov 27, 2013
1 parent 45fe08e commit 29c58d0
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions lib/playhouse/sinatra.rb
Expand Up @@ -16,8 +16,21 @@ def self.registered(app)
app.set :apis, {}

app.get '/' do
settings.plays.to_json
str = ""
str += "<table>"
settings.plays.each do |p|
str += "<tr>"
str += "<td>"
str += "#{p.keys.join(', ')} "
str += "</td>"
str += "<td>"
str += ":: #{p.values.join(', ')}"
str += "</td>"
str += "</tr>"
end
str += "</table>"
render :html, str
end
end
end
end
end

0 comments on commit 29c58d0

Please sign in to comment.