Sha256: 2e69e1f8d1870e0f3ea4cd78ee324ea0b8cd9198c90b31d96a250ae529fa6b85

Contents?: true

Size: 401 Bytes

Versions: 1

Compression:

Stored size: 401 Bytes

Contents

require "torrific/version"
require 'tor'

module Torrific
  class TorControl < ::Tor::Controller
    attr_accessor :password
    
    def initialize(options)
      self.password = options.fetch(:password) { nil }
      super options
    end

    # changes the tor identity
    def change_ip
      self.authenticate self.password
      send_command(:signal, 'NEWNYM')
      self.close
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
torrific-0.0.2 lib/torrific.rb