Methods
Attributes
[R] filename
Public Class methods
new( fname )
    # File lib/action_mailer/vendor/tmail/port.rb, line 29
29:     def initialize( fname )
30:       @filename = File.expand_path(fname)
31:       super()
32:     end
Public Instance methods
==( other )
This method is also aliased as eql?
    # File lib/action_mailer/vendor/tmail/port.rb, line 38
38:     def ==( other )
39:       other.respond_to?(:filename) and @filename == other.filename
40:     end
aopen( &block )
    # File lib/action_mailer/vendor/tmail/port.rb, line 69
69:     def aopen( &block )
70:       File.open(@filename, 'a', &block)
71:     end
copy_to( port )
This method is also aliased as cp
     # File lib/action_mailer/vendor/tmail/port.rb, line 96
 96:     def copy_to( port )
 97:       if FilePort === port
 98:         copy_file @filename, port.filename
 99:       else
100:         File.open(@filename) {|r|
101:         port.wopen {|w|
102:             while s = r.sysread(4096)
103:               w.write << s
104:             end
105:         } }
106:       end
107:     end
cp( port )

Alias for copy_to

eql?( other )

Alias for #==

hash()
    # File lib/action_mailer/vendor/tmail/port.rb, line 44
44:     def hash
45:       @filename.hash
46:     end
inspect()
    # File lib/action_mailer/vendor/tmail/port.rb, line 48
48:     def inspect
49:       "#<#{self.class}:#{@filename}>"
50:     end
move_to( port )
This method is also aliased as mv
    # File lib/action_mailer/vendor/tmail/port.rb, line 85
85:     def move_to( port )
86:       begin
87:         File.link @filename, port.filename
88:       rescue Errno::EXDEV
89:         copy_to port
90:       end
91:       File.unlink @filename
92:     end
mv( port )

Alias for move_to

read_all()
    # File lib/action_mailer/vendor/tmail/port.rb, line 74
74:     def read_all
75:       ropen {|f|
76:           return f.read
77:       }
78:     end
remove()
    # File lib/action_mailer/vendor/tmail/port.rb, line 81
81:     def remove
82:       File.unlink @filename
83:     end
reproducible?()
    # File lib/action_mailer/vendor/tmail/port.rb, line 52
52:     def reproducible?
53:       true
54:     end
ropen( &block )
    # File lib/action_mailer/vendor/tmail/port.rb, line 61
61:     def ropen( &block )
62:       File.open(@filename, &block)
63:     end
size()
    # File lib/action_mailer/vendor/tmail/port.rb, line 56
56:     def size
57:       File.size @filename
58:     end
wopen( &block )
    # File lib/action_mailer/vendor/tmail/port.rb, line 65
65:     def wopen( &block )
66:       File.open(@filename, 'w', &block)
67:     end
Private Instance methods
copy_file( src, dest )

from fileutils.rb

     # File lib/action_mailer/vendor/tmail/port.rb, line 114
114:     def copy_file( src, dest )
115:       st = r = w = nil
116: 
117:       File.open(src,  'rb') {|r|
118:       File.open(dest, 'wb') {|w|
119:           st = r.stat
120:           begin
121:             while true
122:               w.write r.sysread(st.blksize)
123:             end
124:           rescue EOFError
125:           end
126:       } }
127:     end