Fix details in cask command

This commit is contained in:
alexbostock 2018-07-17 10:56:44 +01:00
parent 7fea44ae46
commit 3fd1e914fd
2 changed files with 7 additions and 7 deletions

View File

@ -26,10 +26,6 @@ module Hbc
abstract_phase(self.class.uninstall_dsl_key)
end
def summarize
directives.keys.map(&:to_s).join(", ")
end
private
def class_for_dsl_key(dsl_key)
@ -41,6 +37,10 @@ module Hbc
return if (block = directives[dsl_key]).nil?
class_for_dsl_key(dsl_key).new(cask).instance_eval(&block)
end
def summarize
directives.keys.map(&:to_s).join(", ")
end
end
end
end

View File

@ -139,10 +139,10 @@ module Hbc
"version" => version,
"sha256" => sha256,
"artifacts" => artifacts.map do |a|
if a.respond_to? :to_a
a.to_a
elsif a.methods.include? :to_h
if a.respond_to? :to_h
a.to_h
elsif a.respond_to? :to_a
a.to_a
else
a
end