class Ipfs::Connection::Base
Constants
- DEFAULT_BASE_PATH
Attributes
host[R]
port[R]
Public Instance Methods
build_uri()
click to toggle source
# File lib/connection/base.rb, line 10 def build_uri URI::HTTP.build(host: @host, port: @port) end
make_persistent()
click to toggle source
# File lib/connection/base.rb, line 23 def make_persistent HTTP.persistent build_uri end
up?()
click to toggle source
# File lib/connection/base.rb, line 14 def up? begin HTTP.get("http://#{@host}:#{@port}#{DEFAULT_BASE_PATH}/id") true rescue HTTP::ConnectionError false end end