Class: CreateOurRCFile

Inherits:
Object
  • Object
show all
Defined in:
lib/vpm/tasks/create_our_rc_file.rb

Instance Method Summary collapse

Constructor Details

#initializeCreateOurRCFile

Returns a new instance of CreateOurRCFile.



2
3
4
# File 'lib/vpm/tasks/create_our_rc_file.rb', line 2

def initialize
  @destination = VPM.vpmrc_path
end

Instance Method Details

#performObject



6
7
8
9
10
11
# File 'lib/vpm/tasks/create_our_rc_file.rb', line 6

def perform
  File.open(@destination, "w") do |file|
    file.puts "call pathogen#infect()"
  end
  return true
end

#undoObject



13
14
15
# File 'lib/vpm/tasks/create_our_rc_file.rb', line 13

def undo
  FileUtils.rm @destination
end