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

Add `*_to_slashes` methods to `compat`.

parent e68fc530
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@ module Cask
def cask_path
casks.first.sourcefile_path
rescue CaskInvalidError, CaskUnreadableError
rescue CaskInvalidError, CaskUnreadableError, MethodDeprecatedError
path = CaskLoader.path(args.first)
return path if path.file?
......
require "compat/cask/dsl/version"
module Cask
class DSL
class Version < ::String
module Compat
def dots_to_slashes
odeprecated "#dots_to_slashes"
version { tr(".", "/") }
end
def hyphens_to_slashes
odeprecated "#hyphens_to_slashes"
version { tr("-", "/") }
end
def underscores_to_slashes
odeprecated "#underscores_to_slashes"
version { tr("_", "/") }
end
end
prepend Compat
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