Class: Tor::Configuration
- Inherits:
-
Object
- Object
- Tor::Configuration
- Defined in:
- lib/tor/configuration.rb
Instance Attribute Summary collapse
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#ip ⇒ Object
Returns the value of attribute ip.
-
#port ⇒ Object
Returns the value of attribute port.
Instance Method Summary collapse
- #add_header(header, value) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
11 12 13 |
# File 'lib/tor/configuration.rb', line 11 def headers @headers end |
#ip ⇒ Object
Returns the value of attribute ip.
8 9 10 |
# File 'lib/tor/configuration.rb', line 8 def ip @ip end |
#port ⇒ Object
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 |