Method: Host.modify
- Defined in:
- lib/blockhosts.rb
.modify ⇒ Object
79 80 81 82 83 84 85 86 87 |
# File 'lib/blockhosts.rb', line 79 def self.modify() return unless block_given? s = File.read(@file) s2 = s.lines.map {|x| yield(x)}.join File.write(@file, s2) unless s == s2 end |