diff options
| author | Markus Reiter | 2017-10-07 00:31:28 +0200 |
|---|---|---|
| committer | Markus Reiter | 2017-10-08 16:10:37 +0200 |
| commit | 175ca909ee1a5b57aa0cae2c879920511f311b14 (patch) | |
| tree | 067464b4c08f4c16ca3439b533f06669a78c370c /Library/Homebrew/dev-cmd/man.rb | |
| parent | 91ab116ace7f4f97d3440190463c93be9ec6d675 (diff) | |
| download | brew-175ca909ee1a5b57aa0cae2c879920511f311b14.tar.bz2 | |
Clean up code style and remove `.rubocop_todo.yml`.
Diffstat (limited to 'Library/Homebrew/dev-cmd/man.rb')
| -rw-r--r-- | Library/Homebrew/dev-cmd/man.rb | 9 |
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 |
