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.



227
228
229
230
# File 'lib/action_dispatch/routing/inspector.rb', line 227

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

Instance Method Details

#section(routes) ⇒ Object



236
237
238
# File 'lib/action_dispatch/routing/inspector.rb', line 236

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

#section_title(title) ⇒ Object



232
233
234
# File 'lib/action_dispatch/routing/inspector.rb', line 232

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