module Twigg::App::Routes

Public Instance Methods

author_path(author) click to toggle source
# File lib/twigg-app/app/routes.rb, line 4
def author_path(author)
  '/authors/' + author.tr(' ', '.')
end
authors_path(options = {}) click to toggle source
# File lib/twigg-app/app/routes.rb, line 8
def authors_path(options = {})
  '/authors' + query_string_from_options(options)
end
gerrit_authors_path() click to toggle source
# File lib/twigg-app/app/routes.rb, line 12
def gerrit_authors_path
  '/gerrit/authors'
end
gerrit_changes_path() click to toggle source
# File lib/twigg-app/app/routes.rb, line 16
def gerrit_changes_path
  '/gerrit'
end
gerrit_tags_path() click to toggle source
# File lib/twigg-app/app/routes.rb, line 20
def gerrit_tags_path
  '/gerrit/tags'
end
pairs_path(options = {}) click to toggle source
# File lib/twigg-app/app/routes.rb, line 24
def pairs_path(options = {})
  '/pairs' + query_string_from_options(options)
end
pivotal_path(options = {}) click to toggle source
# File lib/twigg-app/app/routes.rb, line 28
def pivotal_path(options = {})
  '/pivotal' + query_string_from_options(options)
end
russian_novels_path(options = {}) click to toggle source
# File lib/twigg-app/app/routes.rb, line 32
def russian_novels_path(options = {})
  '/russian-novels' + query_string_from_options(options)
end
team_path(team) click to toggle source
# File lib/twigg-app/app/routes.rb, line 36
def team_path(team)
  '/teams/' + team.tr(' ', '.')
end
teams_path(options = {}) click to toggle source
# File lib/twigg-app/app/routes.rb, line 40
def teams_path(options = {})
  '/teams' + query_string_from_options(options)
end

Private Instance Methods

query_string_from_options(options) click to toggle source
# File lib/twigg-app/app/routes.rb, line 46
def query_string_from_options(options)
  options.empty? ? '' : "?#{::URI.encode_www_form(options)}"
end