Fix missing methods in cask DSL.
This commit is contained in:
parent
85c061295d
commit
77d25da5e5
@ -282,6 +282,10 @@ module Cask
|
||||
end
|
||||
end
|
||||
|
||||
def respond_to_missing?(*)
|
||||
super
|
||||
end
|
||||
|
||||
def method_missing(method, *)
|
||||
if method
|
||||
Utils.method_missing_message(method, token)
|
||||
@ -291,10 +295,6 @@ module Cask
|
||||
end
|
||||
end
|
||||
|
||||
def respond_to_missing?(*)
|
||||
super || true
|
||||
end
|
||||
|
||||
def appdir
|
||||
cask.config.appdir
|
||||
end
|
||||
|
@ -18,6 +18,10 @@ module Cask
|
||||
@command.run!(executable, **options)
|
||||
end
|
||||
|
||||
def respond_to_missing?(*)
|
||||
super
|
||||
end
|
||||
|
||||
def method_missing(method, *)
|
||||
if method
|
||||
underscored_class = self.class.name.gsub(/([[:lower:]])([[:upper:]][[:lower:]])/, '\1_\2').downcase
|
||||
@ -28,10 +32,6 @@ module Cask
|
||||
super
|
||||
end
|
||||
end
|
||||
|
||||
def respond_to_missing?(*)
|
||||
super || true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -80,12 +80,11 @@ module Cask
|
||||
end
|
||||
|
||||
def self.method_missing_message(method, token, section = nil)
|
||||
poo = []
|
||||
poo << "Unexpected method '#{method}' called"
|
||||
poo << "during #{section}" if section
|
||||
poo << "on Cask #{token}."
|
||||
message = +"Unexpected method '#{method}' called "
|
||||
message << "during #{section} " if section
|
||||
message << "on Cask #{token}."
|
||||
|
||||
opoo("#{poo.join(" ")}\n#{error_message_with_suggestions}")
|
||||
opoo "#{message}\n#{error_message_with_suggestions}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user