Class: Hodl::Lightning::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/hodl/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/hodl/configuration.rb', line 12

def initialize
  # Path to automatically generated cert e.g.: "/Users/dsalamau/Library/Application Support/Lnd/tls.cert"
  @tls_cert_path = ""
  # Default host "127.0.0.1"
  @host          = ""
  # Default port "10009"
  @port          = ""
  # "nil" for unsafe connection
  @macaroon_path = nil
  @logger        = {
                      device: $stdout,
                      level:  :info,
                      formatter: nil,
                    }
end

Instance Attribute Details

#hostObject

Returns the value of attribute host.



8
9
10
# File 'lib/hodl/configuration.rb', line 8

def host
  @host
end

#loggerObject

Returns the value of attribute logger.



10
11
12
# File 'lib/hodl/configuration.rb', line 10

def logger
  @logger
end

#macaroon_pathObject

Returns the value of attribute macaroon_path.



7
8
9
# File 'lib/hodl/configuration.rb', line 7

def macaroon_path
  @macaroon_path
end

#portObject

Returns the value of attribute port.



9
10
11
# File 'lib/hodl/configuration.rb', line 9

def port
  @port
end

#tls_cert_pathObject

Returns the value of attribute tls_cert_path.



6
7
8
# File 'lib/hodl/configuration.rb', line 6

def tls_cert_path
  @tls_cert_path
end