Method: Protobuf::Rpc::Service.located_at
- Defined in:
- lib/protobuf/rpc/service.rb
.located_at(location) ⇒ Object
Shorthand call to configure, passing a string formatted as hostname:port e.g. 127.0.0.1:9933 e.g. localhost:0
83 84 85 86 87 |
# File 'lib/protobuf/rpc/service.rb', line 83 def self.located_at(location) return if location.nil? || location.downcase.strip !~ /.+:\d+/ host, port = location.downcase.strip.split ':' configure(:host => host, :port => port.to_i) end |