From b86c8efb79b3ed835d552c4d7416640ef10caf21 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sat, 24 Sep 2016 13:52:43 +0200 Subject: Cask: Use nested classes and modules. --- Library/Homebrew/cask/lib/hbc/without_source.rb | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'Library/Homebrew/cask/lib/hbc/without_source.rb') diff --git a/Library/Homebrew/cask/lib/hbc/without_source.rb b/Library/Homebrew/cask/lib/hbc/without_source.rb index 6ed826e41..69131d5c7 100644 --- a/Library/Homebrew/cask/lib/hbc/without_source.rb +++ b/Library/Homebrew/cask/lib/hbc/without_source.rb @@ -1,15 +1,17 @@ -class Hbc::WithoutSource < Hbc::Cask - # Override from `Hbc::DSL` because we don't have a cask source file to work - # with, so we don't know the cask's `version`. - def staged_path - (caskroom_path.children - [metadata_master_container_path]).first - end +module Hbc + class WithoutSource < Cask + # Override from `Hbc::DSL` because we don't have a cask source file to work + # with, so we don't know the cask's `version`. + def staged_path + (caskroom_path.children - [metadata_master_container_path]).first + end - def to_s - "#{token} (!)" - end + def to_s + "#{token} (!)" + end - def installed? - caskroom_path.exist? + def installed? + caskroom_path.exist? + end end end -- cgit v1.2.3