module Nuggets::Data::UpdateMixin

Public Instance Methods

update(string) → anInteger click to toggle source

Update DATA with string.

   # File lib/nuggets/data/update_mixin.rb
35 def update(string)
36   File.open(self, 'r+') { |io|
37     io.seek(pos)
38     io.truncate(pos)
39     io.write(string)
40   }
41 end