aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd/man.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/dev-cmd/man.rb')
-rw-r--r--Library/Homebrew/dev-cmd/man.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/Library/Homebrew/dev-cmd/man.rb b/Library/Homebrew/dev-cmd/man.rb
index 472bb7c2b..b2bb3c8c3 100644
--- a/Library/Homebrew/dev-cmd/man.rb
+++ b/Library/Homebrew/dev-cmd/man.rb
@@ -48,12 +48,9 @@ module Homebrew
def path_glob_commands(glob)
Pathname.glob(glob)
.sort_by { |source_file| sort_key_for_path(source_file) }
- .map do |source_file|
- source_file.read.lines
- .grep(/^#:/)
- .map { |line| line.slice(2..-1) }
- .join
- end.reject { |s| s.strip.empty? || s.include?("@hide_from_man_page") }
+ .map(&:read).map(&:lines)
+ .map { |lines| lines.grep(/^#:/).map { |line| line.slice(2..-1) }.join }
+ .reject { |s| s.strip.empty? || s.include?("@hide_from_man_page") }
end
def build_man_page