aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib/hbc/cli/update.rb
diff options
context:
space:
mode:
authorMarkus Reiter2016-09-24 13:52:43 +0200
committerMarkus Reiter2016-09-24 16:00:58 +0200
commitb86c8efb79b3ed835d552c4d7416640ef10caf21 (patch)
tree7e1edc8a8f339e4d2781f43576d40c9c79aebcdc /Library/Homebrew/cask/lib/hbc/cli/update.rb
parent687f0fcf721c8e36f32570ed72d0988a6eaf986f (diff)
downloadbrew-b86c8efb79b3ed835d552c4d7416640ef10caf21.tar.bz2
Cask: Use nested classes and modules.
Diffstat (limited to 'Library/Homebrew/cask/lib/hbc/cli/update.rb')
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/update.rb30
1 files changed, 17 insertions, 13 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli/update.rb b/Library/Homebrew/cask/lib/hbc/cli/update.rb
index ceb947544..1d6ed2af5 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/update.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/update.rb
@@ -1,16 +1,20 @@
-class Hbc::CLI::Update < Hbc::CLI::Base
- def self.run(*_ignored)
- result = Hbc::SystemCommand.run(Hbc.homebrew_executable,
- args: %w[update])
- # TODO: separating stderr/stdout is undesirable here.
- # Hbc::SystemCommand should have an option for plain
- # unbuffered output.
- print result.stdout
- $stderr.print result.stderr
- exit result.exit_status
- end
+module Hbc
+ class CLI
+ class Update < Base
+ def self.run(*_ignored)
+ result = SystemCommand.run(Hbc.homebrew_executable,
+ args: %w[update])
+ # TODO: separating stderr/stdout is undesirable here.
+ # Hbc::SystemCommand should have an option for plain
+ # unbuffered output.
+ print result.stdout
+ $stderr.print result.stderr
+ exit result.exit_status
+ end
- def self.help
- "a synonym for 'brew update'"
+ def self.help
+ "a synonym for 'brew update'"
+ end
+ end
end
end