class Otis::Generator::RoutesPresenter

Public Class Methods

new(routes) click to toggle source
# File lib/otis/generator/routes_presenter.rb, line 4
def initialize(routes)
  @routes = routes
end

Public Instance Methods

endpoints() click to toggle source
# File lib/otis/generator/routes_presenter.rb, line 8
def endpoints
  @routes.keys
end
map() click to toggle source
# File lib/otis/generator/routes_presenter.rb, line 12
def map
  s = ''
  @routes.each_pair { |route, klass| s << ":#{route} => #{klass},\n" }
  s
end