summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands/open_command.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/commands/open_command.rb')
-rw-r--r--lib/rubygems/commands/open_command.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/rubygems/commands/open_command.rb b/lib/rubygems/commands/open_command.rb
index 1e616fd68f..d5283f72dd 100644
--- a/lib/rubygems/commands/open_command.rb
+++ b/lib/rubygems/commands/open_command.rb
@@ -1,18 +1,18 @@
# frozen_string_literal: true
-require_relative '../command'
-require_relative '../version_option'
+require_relative "../command"
+require_relative "../version_option"
class Gem::Commands::OpenCommand < Gem::Command
include Gem::VersionOption
def initialize
- super 'open', 'Open gem sources in editor'
+ super "open", "Open gem sources in editor"
- add_option('-e', '--editor COMMAND', String,
+ add_option("-e", "--editor COMMAND", String,
"Prepends COMMAND to gem path. Could be used to specify editor.") do |command, options|
options[:editor] = command || get_env_editor
end
- add_option('-v', '--version VERSION', String,
+ add_option("-v", "--version VERSION", String,
"Opens specific gem version") do |version|
options[:version] = version
end
@@ -40,10 +40,10 @@ class Gem::Commands::OpenCommand < Gem::Command
end
def get_env_editor
- ENV['GEM_EDITOR'] ||
- ENV['VISUAL'] ||
- ENV['EDITOR'] ||
- 'vi'
+ ENV["GEM_EDITOR"] ||
+ ENV["VISUAL"] ||
+ ENV["EDITOR"] ||
+ "vi"
end
def execute