Class: DocsterController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/docster_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
8
9
10
11
12
# File 'app/controllers/docster_controller.rb', line 5

def index
  files = Dir.glob(File.expand_path("app/controllers/**/*_controller.rb", Rails.root)) <<
    File.expand_path("config/routes.rb", Rails.root)

  result = Docster::Parser.parse_files_for_doc files
  @items = result[:items]
  @doc_items = result[:doc_items]
end