Method: UI.browse_list

Defined in:
lib/ruby_doc/cli/ui.rb

.browse_list(page, identifier) ⇒ Object



247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# File 'lib/ruby_doc/cli/ui.rb', line 247

def self.browse_list(page, identifier) 
  puts sepL
  page.each_with_index do |doc, index|  
    
    if doc.type == "Class" || doc.type == "Module"
      li = ["#{index + 1}.".yellow, doc.name.light_cyan]
    else 
      li = ["#{index + 1}.".yellow, doc.name.cyan]
    end
    
    puts li.join(" ")
  end
  
  if identifier == "Last"
    puts sepR
    puts "End of List".red
  end
  puts sepR 
  
  last_page_menu(page) if identifier == "Last"
  browse_menu(page) if !(identifier == "Last")
  
  browse_control(identifier, page)
end