Class: Tor::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/tor/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



17
18
19
20
21
# File 'lib/tor/configuration.rb', line 17

def initialize
  @ip      = '127.0.0.1'
  @port    = 9050
  @headers = Hash.new
end

Instance Attribute Details

#headersObject (readonly)

Returns the value of attribute headers.



11
12
13
# File 'lib/tor/configuration.rb', line 11

def headers
  @headers
end

#ipObject

Returns the value of attribute ip.



8
9
10
# File 'lib/tor/configuration.rb', line 8

def ip
  @ip
end

#portObject

Returns the value of attribute port.



8
9
10
# File 'lib/tor/configuration.rb', line 8

def port
  @port
end

Instance Method Details

#add_header(header, value) ⇒ Object



13
14
15
# File 'lib/tor/configuration.rb', line 13

def add_header(header, value)
  @headers[header] = value
end