Module: Railbus::RouteSetPresenter

Defined in:
lib/railbus/route_set_presenter.rb

Class Method Summary collapse

Class Method Details

.to_h(route_set) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/railbus/route_set_presenter.rb', line 4

def to_h(route_set)
  result = {}
  route_set.paths.each do |route|
    result[route.name] = route.to_h
  end
  result
end