diff options
Diffstat (limited to 'Library/Homebrew/cask/lib/hbc/utils.rb')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/utils.rb | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/utils.rb b/Library/Homebrew/cask/lib/hbc/utils.rb index 59e85aaeb..22f826e74 100644 --- a/Library/Homebrew/cask/lib/hbc/utils.rb +++ b/Library/Homebrew/cask/lib/hbc/utils.rb @@ -4,24 +4,15 @@ require "stringio" BUG_REPORTS_URL = "https://github.com/caskroom/homebrew-cask#reporting-bugs".freeze -# monkeypatch Object - not a great idea -class Object - def utf8_inspect - return inspect unless defined?(Encoding) - return map(&:utf8_inspect) if respond_to?(:map) - inspect.force_encoding("UTF-8").sub(/\A"(.*)"\Z/, '\1') - end -end - class Buffer < StringIO + extend Predicable + + attr_predicate :tty? + def initialize(tty = false) super() @tty = tty end - - def tty? - @tty - end end # global methods |
