Skip to content

Commit c3f6bff

Browse files
committed
Fix support to Ruby 2.1
1 parent 7dd12ab commit c3f6bff

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/sdoc/generator.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,10 @@ def generate_class_tree_level(classes, visited = {})
193193

194194
### Determines index path based on @options.main_page (or lack thereof)
195195
def index_path
196+
main_page = @options.main_page
196197
# Transform class name to file path
197-
if @options.main_page&.include?("::")
198-
slashed = @options.main_page.sub(/^::/, "").gsub("::", "/")
198+
if main_page && main_page.include?("::")
199+
slashed = main_page.sub(/^::/, "").gsub("::", "/")
199200
"%s/%s.html" % [ class_dir, slashed ]
200201
else
201202
index.path

0 commit comments

Comments
 (0)