Merge pull request #3255 from reitermarkus/summarize

Add missing `summarize` method.
This commit is contained in:
Markus Reiter 2017-10-02 14:21:45 +02:00 committed by GitHub
commit e322663836
2 changed files with 5 additions and 1 deletions

View File

@ -37,7 +37,7 @@ module Hbc
end end
def summarize def summarize
to_h.map { |key, val| [*val].map { |v| "#{key.inspect} => #{v.inspect}" }.join(", ") }.join(", ") to_h.flat_map { |key, val| [*val].map { |v| "#{key.inspect} => #{v.inspect}" } }.join(", ")
end end
private private

View File

@ -16,6 +16,10 @@ module Hbc
private private
def summarize
path.relative_path_from(cask.staged_path).to_s
end
def extract(command: nil, verbose: nil, **_) def extract(command: nil, verbose: nil, **_)
container = Container.for_path(path, command) container = Container.for_path(path, command)