Sha256: d9fa3ddd58f9fe0a69b4859f3b24b7e2da63a2be71fc03fbd84f0da079c92568
Contents?: true
Size: 626 Bytes
Versions: 9
Compression:
Stored size: 626 Bytes
Contents
class Proxy attr_accessor :ip, :port, :username, :password, :status, :last_used, :user_agent def initialize(ip:, port: 80, username: nil, password: nil, status: nil, last_used: nil, user_agent: nil) @ip, @port, @username, @password, @status, @last_used = ip, port, username, password, status, last_used end def dead @status = 'dead' @last_used = Time.now end def good @status = 'good' @last_used = Time.now end def good? @status == 'good' ? true : false end def dead? @status == 'dead' ? true : false end def used @last_used = Time.now end end
Version data entries
9 entries across 9 versions & 1 rubygems