Class: ActionDispatch::Routing::ConsoleFormatter::Expanded

Inherits:
Base
  • Object
show all
Defined in:
lib/action_dispatch/routing/inspector.rb

Instance Method Summary collapse

Methods inherited from Base

#header, #no_routes, #result

Constructor Details

#initialize(width: ) ⇒ Expanded

Returns a new instance of Expanded.



229
230
231
232
# File 'lib/action_dispatch/routing/inspector.rb', line 229

def initialize(width: IO.console_size[1])
  @width = width
  super()
end

Instance Method Details

#section(routes) ⇒ Object



238
239
240
# File 'lib/action_dispatch/routing/inspector.rb', line 238

def section(routes)
  @buffer << draw_expanded_section(routes)
end

#section_title(title) ⇒ Object



234
235
236
# File 'lib/action_dispatch/routing/inspector.rb', line 234

def section_title(title)
  @buffer << "\n#{"[ #{title} ]"}"
end