Skip to content

Commit

Permalink
Stop using an attr_accessor in favor of setting instance variables an…
Browse files Browse the repository at this point in the history
…d an attr_reader
  • Loading branch information
Andy Fleener committed Apr 20, 2015
1 parent 63b9d30 commit 92f7f16
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/gem-empty/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
require 'fileutils'

class EmptyCommand < Gem::Command
attr_accessor :options
attr_reader :options

def initialize
super 'empty', 'Remove all gems from current GEM_HOME.'
self.options = { :install_dir => Gem.dir, :force => true, :executables => true }
@default_options = { :install_dir => Gem.dir, :force => true, :executables => true }
end

def arguments # :nodoc:
Expand All @@ -31,7 +31,7 @@ def description # :nodoc:
end

def execute(opts = {})
self.options = options.merge(opts)
@options = @default_options.merge(opts)
uninstaller = Gem::Uninstaller.new(nil, options)
uninstaller.remove_all(gem_dir_specs)

Expand Down

0 comments on commit 92f7f16

Please sign in to comment.