Method: I2P::BOB::Client#initialize
- Defined in:
- lib/i2p/bob/client.rb
#initialize(options = {}) {|client| ... } ⇒ Client
Initializes a new client instance.
103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/i2p/bob/client.rb', line 103 def initialize( = {}, &block) = .dup @host = (.delete(:host) || DEFAULT_HOST).to_s @port = (.delete(:port) || DEFAULT_PORT).to_i if block_given? case block.arity when 1 then block.call(self) else instance_eval(&block) end end end |