Skip to content
This repository has been archived by the owner on Jun 12, 2018. It is now read-only.

Commit

Permalink
Move extra_files into attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
sj26 committed Aug 1, 2012
1 parent c5bd388 commit 48867e0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/models/gem_documentation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ def rdoc_options_main
end

def readme
rdoc_options_main || file.glob("README*").sort_by(&:length).first
@readme ||= rdoc_options_main || file.glob("README*").sort_by(&:length).first
end

def extra_files
@extra_files ||= (extra_rdoc_files - [readme])
end

def yard_path
Expand All @@ -52,7 +56,6 @@ def generate!
YARD::Registry.clear
YARD::Registry.yardoc_file = yard_yardoc_path
globals = OpenStruct.new
extra_files = (extra_rdoc_files - [readme])
extra_file_objects = []
readme_object = nil
file.data_tar do |data_tar|
Expand Down

0 comments on commit 48867e0

Please sign in to comment.