Class: Algorand::AlgodClient
- Inherits:
-
Object
- Object
- Algorand::AlgodClient
- Defined in:
- lib/algorand/algod_client.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(host: Configuration.algod_host, token:) ⇒ AlgodClient
constructor
A new instance of AlgodClient.
- #test ⇒ Object
Constructor Details
#initialize(host: Configuration.algod_host, token:) ⇒ AlgodClient
Returns a new instance of AlgodClient.
7 8 9 10 |
# File 'lib/algorand/algod_client.rb', line 7 def initialize(host: Configuration.algod_host, token:) @host = host @token = token end |
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
5 6 7 |
# File 'lib/algorand/algod_client.rb', line 5 def host @host end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
5 6 7 |
# File 'lib/algorand/algod_client.rb', line 5 def token @token end |
Instance Method Details
#test ⇒ Object
12 13 14 |
# File 'lib/algorand/algod_client.rb', line 12 def test HTTParty.get("http://#{host}/v2/status", headers: headers) end |