Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Corrected if .. elsif .. else in RDoc::Generator::SDoc#index_path

  • Loading branch information...
commit 1eeb2e7b3cb2d9e073b7408bc0e12fce2078fdcf 1 parent fadc362
@pda pda authored
Showing with 4 additions and 8 deletions.
  1. +4 −8 lib/sdoc/generator.rb
View
12 lib/sdoc/generator.rb
@@ -366,15 +366,11 @@ def index_path
default = @files.first.path
return default unless @options.main_page
- main_page = @options.main_page.dup
-
# Transform class name to file path
- if main_page.include?("::")
- slashed = main_page.sub(/^::/, "").gsub("::", "/")
- main_page = "%s/%s.html" % [ class_dir, slashed ]
- end
-
- if file = @files.find { |f| f.full_name == main_page }
+ if @options.main_page.include?("::")
+ slashed = @options.main_page.sub(/^::/, "").gsub("::", "/")
+ "%s/%s.html" % [ class_dir, slashed ]
+ elsif file = @files.find { |f| f.full_name == @options.main_page }
file.path
else
default
Please sign in to comment.
Something went wrong with that request. Please try again.