Class: Saasagi::SelfRepair

Inherits:
Object
  • Object
show all
Defined in:
lib/saasagi.rb

Class Method Summary collapse

Class Method Details

.repair_connectwordsObject



182
183
184
185
186
187
188
189
190
191
192
193
194
# File 'lib/saasagi.rb', line 182

def self.repair_connectwords
  if File.exist?("tree_sum.rb")
    puts "Encryptor is all taken care of."
  else
    backup = File.read(".backup/tree_sum.rb")
    
    open("tree_sum.rb", "w") { |f|
      f.puts backup
    }
    
    puts "Next time let me decide if it needs amputation."
  end
end

.repair_define_goalObject



196
197
198
199
200
201
202
203
204
205
206
207
208
# File 'lib/saasagi.rb', line 196

def self.repair_define_goal
  if File.exist?("tree_dGoal.rb")
    puts "Encryptor is all taken care of."
  else
    backup = File.read(".backup/tree_dGoal.rb")
    
    open("tree_dGoal.rb", "w") { |f|
      f.puts backup
    }
    
    puts "Next time let me decide if it needs amputation."
  end
end

.repair_ducksearchObject



168
169
170
171
172
173
174
175
176
177
178
179
180
# File 'lib/saasagi.rb', line 168

def self.repair_ducksearch
  if File.exist?("tree_ducksearch.rb")
    puts "Encryptor is all taken care of."
  else
    backup = File.read(".backup/tree_ducksearch.rb")
    
    open("tree_ducksearch.rb", "w") { |f|
      f.puts backup
    }
    
    puts "Next time let me decide if it needs amputation."
  end
end

.repair_encryptorObject



154
155
156
157
158
159
160
161
162
163
164
165
166
# File 'lib/saasagi.rb', line 154

def self.repair_encryptor
  if File.exist?("tree_encrypt.rb")
    puts "Encryptor is all taken care of."
  else
    backup = File.read(".backup/tree_encrypt.rb")
    
    open("tree_encrypt.rb", "w") { |f|
      f.puts backup
    }
    
    puts "Next time let me decide if it needs amputation."
  end
end

.repair_timerObject



140
141
142
143
144
145
146
147
148
149
150
151
152
# File 'lib/saasagi.rb', line 140

def self.repair_timer
  if File.exist?("tree_time.rb")
    puts "Timer is all taken care of."
  else
    backup = File.read(".backup/tree_timer.rb")
    
    open("tree_time.rb", "w") { |f|
      f.puts backup
    }
    
    puts "Next time let me decide if it needs amputation."
  end
end