Methods
Attributes
[R] filename
Public Class methods
new( fname )
    # File lib/action_mailer/vendor/tmail/port.rb, line 48
48:     def initialize( fname )
49:       @filename = File.expand_path(fname)
50:       super()
51:     end
Public Instance methods
==( other )
This method is also aliased as eql?
    # File lib/action_mailer/vendor/tmail/port.rb, line 57
57:     def ==( other )
58:       other.respond_to?(:filename) and @filename == other.filename
59:     end
aopen( &block )
    # File lib/action_mailer/vendor/tmail/port.rb, line 88
88:     def aopen( &block )
89:       File.open(@filename, 'a', &block)
90:     end
copy_to( port )
This method is also aliased as cp
     # File lib/action_mailer/vendor/tmail/port.rb, line 115
115:     def copy_to( port )
116:       if FilePort === port
117:         copy_file @filename, port.filename
118:       else
119:         File.open(@filename) {|r|
120:         port.wopen {|w|
121:             while s = r.sysread(4096)
122:               w.write << s
123:             end
124:         } }
125:       end
126:     end
cp( port )

Alias for copy_to

eql?( other )

Alias for #==

hash()
    # File lib/action_mailer/vendor/tmail/port.rb, line 63
63:     def hash
64:       @filename.hash
65:     end
inspect()
    # File lib/action_mailer/vendor/tmail/port.rb, line 67
67:     def inspect
68:       "#<#{self.class}:#{@filename}>"
69:     end
move_to( port )
This method is also aliased as mv
     # File lib/action_mailer/vendor/tmail/port.rb, line 104
104:     def move_to( port )
105:       begin
106:         File.link @filename, port.filename
107:       rescue Errno::EXDEV
108:         copy_to port
109:       end
110:       File.unlink @filename
111:     end
mv( port )

Alias for move_to

read_all()
    # File lib/action_mailer/vendor/tmail/port.rb, line 93
93:     def read_all
94:       ropen {|f|
95:           return f.read
96:       }
97:     end
remove()
     # File lib/action_mailer/vendor/tmail/port.rb, line 100
100:     def remove
101:       File.unlink @filename
102:     end
reproducible?()
    # File lib/action_mailer/vendor/tmail/port.rb, line 71
71:     def reproducible?
72:       true
73:     end
ropen( &block )
    # File lib/action_mailer/vendor/tmail/port.rb, line 80
80:     def ropen( &block )
81:       File.open(@filename, &block)
82:     end
size()
    # File lib/action_mailer/vendor/tmail/port.rb, line 75
75:     def size
76:       File.size @filename
77:     end
wopen( &block )
    # File lib/action_mailer/vendor/tmail/port.rb, line 84
84:     def wopen( &block )
85:       File.open(@filename, 'w', &block)
86:     end
Private Instance methods
copy_file( src, dest )

from fileutils.rb

     # File lib/action_mailer/vendor/tmail/port.rb, line 133
133:     def copy_file( src, dest )
134:       st = r = w = nil
135: 
136:       File.open(src,  'rb') {|r|
137:       File.open(dest, 'wb') {|w|
138:           st = r.stat
139:           begin
140:             while true
141:               w.write r.sysread(st.blksize)
142:             end
143:           rescue EOFError
144:           end
145:       } }
146:     end