class OzonParser::Proxy

Attributes

host[R]
port[R]

Public Class Methods

new(url) click to toggle source
# File lib/ozon_parser/proxy.rb, line 5
def initialize(url)
  uri = URI url
  @host, @port = uri.host, uri.port
end

Public Instance Methods

freeze() click to toggle source
# File lib/ozon_parser/proxy.rb, line 10
def freeze
  @frozen_to = Time.now + freeze_time
end
freeze_time() click to toggle source
# File lib/ozon_parser/proxy.rb, line 14
def freeze_time
  OzonParser.config.proxy_freeze_time || 1.minute
end
frozen?() click to toggle source
# File lib/ozon_parser/proxy.rb, line 18
def frozen?
  Time.now < @frozen_to
end