Module: Tins::Write

Included in:
IO
Defined in:
lib/tins/write.rb

Class Method Summary collapse

Class Method Details

.extended(modul) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/tins/write.rb', line 5

def self.extended(modul)
  modul.extend SecureWrite
  if modul.respond_to?(:write)
    $DEBUG and warn "Skipping inclusion of Tins::Write#write method, include Tins::Write::SecureWrite#secure_write instead"
  else
    class << modul; self; end.instance_eval do
      alias_method :write, :secure_write
    end
  end
  super
end