File: stub_socket.rb

package info (click to toggle)
ruby-fakeweb 1.3.0%2Bgit20170806%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 464 kB
  • sloc: ruby: 2,058; sh: 24; makefile: 3
file content (23 lines) | stat: -rw-r--r-- 339 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module FakeWeb
  class StubSocket #:nodoc:

    Net::BufferedIO.instance_methods.grep(/_timeout$/).each do |timeout|
      attr_accessor timeout
    end

    def initialize(*args)
    end

    def closed?
      @closed ||= false
      @closed
    end

    def close
      @closed = true
    end

    def readuntil(*args)
    end
  end
end