app/models/docthis/page.rb
# Obtains the title of this page.
Obtains the title of this page.
Obtains the title of this page .
def title
    if has_children?
      File.basename(File.dirname(@file)).gsub("-", " ").capitalize
    else
      File.basename(@file).gsub("-", " ").sub(".md", "").capitalize
    end
  end
def title if has_children? File . basename ( File . dirname ( @file ) ) . gsub ( "-" , " " ) . capitalize else File . basename ( @file ) . gsub ( "-" , " " ) . sub ( ".md" , "" ) . capitalize end end
Obtains the title of this page.
Obtains the title of this page .