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

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

Instance Method Summary collapse

Methods inherited from Base

#header, #no_routes, #result

Constructor Details

#initialize(width: IO.console_size[1]) ⇒ Expanded

Returns a new instance of Expanded.


210
211
212
213
# File 'actionpack/lib/action_dispatch/routing/inspector.rb', line 210

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

Instance Method Details

#section(routes) ⇒ Object


219
220
221
# File 'actionpack/lib/action_dispatch/routing/inspector.rb', line 219

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

#section_title(title) ⇒ Object


215
216
217
# File 'actionpack/lib/action_dispatch/routing/inspector.rb', line 215

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