Class | TMail::StringPort |
In: |
lib/tmail/port.rb
|
Parent: | Port |
# File lib/tmail/port.rb, line 294 def ==(other) other.is_a?(StringPort) and @buffer.equal?(other.string) end
# File lib/tmail/port.rb, line 323 def aopen(&block) @buffer ||= '' StringOutput.new(@buffer, &block) end
# File lib/tmail/port.rb, line 304 def inspect "#<#{self.class}:id=#{sprintf '0x%x', @buffer.object_id}>" end
# File lib/tmail/port.rb, line 342 def move_to(port) if port.is_a?(StringPort) tmp = @buffer port.instance_eval { @buffer = tmp } else copy_to port end remove end
# File lib/tmail/port.rb, line 312 def ropen(&block) # FIXME: Should we raise ENOENT? raise Errno::ENOENT, "#{inspect} is already removed" unless @buffer StringInput.open(@buffer, &block) end