Skip to content

Commit 7969ad3

Browse files
committed
memoize InstallerCommand#installer and #script_path
1 parent b70ac2b commit 7969ad3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/completely/commands/install.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ def run
3535
private
3636

3737
def installer
38-
Installer.new program: args['PROGRAM'], script_path: script_path
38+
@installer ||= Installer.new(program: args['PROGRAM'], script_path: script_path)
3939
end
4040

4141
def script_path
42-
args['SCRIPT_PATH'] || 'completely.bash'
42+
@script_path ||= args['SCRIPT_PATH'] || 'completely.bash'
4343
end
4444
end
4545
end

0 commit comments

Comments
 (0)