Class: CreateOurRCFile
- Inherits:
-
Object
- Object
- CreateOurRCFile
- Defined in:
- lib/vpm/tasks/create_our_rc_file.rb
Instance Method Summary collapse
-
#initialize ⇒ CreateOurRCFile
constructor
A new instance of CreateOurRCFile.
- #perform ⇒ Object
- #undo ⇒ Object
Constructor Details
#initialize ⇒ CreateOurRCFile
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
#perform ⇒ Object
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 |
#undo ⇒ Object
13 14 15 |
# File 'lib/vpm/tasks/create_our_rc_file.rb', line 13 def undo FileUtils.rm @destination end |