Skip to content
Snippets Groups Projects
Commit 77d25da5 authored by Markus Reiter's avatar Markus Reiter
Browse files

Fix missing methods in cask DSL.

parent 85c06129
No related branches found
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment