Class: Ipfs::Connection::IpfsConfig

Inherits:
Base
  • Object
show all
Defined in:
lib/ruby-ipfs-http-client/connection/ipfs_config.rb

Constant Summary collapse

CONFIG_FILEPATH =
"#{ENV['HOME']}/.ipfs/config"

Constants inherited from Base

Base::DEFAULT_BASE_PATH

Instance Attribute Summary

Attributes inherited from Base

#host, #port

Instance Method Summary collapse

Methods inherited from Base

#build_uri, #make_persistent, #up?

Constructor Details

#initializeIpfsConfig

Returns a new instance of IpfsConfig.



8
9
10
11
12
13
# File 'lib/ruby-ipfs-http-client/connection/ipfs_config.rb', line 8

def initialize
  parse_config.tap { |location|
    @host = location[:host]
    @port = location[:port]
  }
end