Class: Algorand::Configuration
- Inherits:
-
Object
- Object
- Algorand::Configuration
- Includes:
- Singleton
- Defined in:
- lib/algorand/configuration.rb
Constant Summary collapse
- DEFAULT_ALGOD_HOST =
'localhost:4001'- DEFAUT_INDEXER_HOST =
'localhost:8980'- DEFAULT_KMD_HOST =
'localhost:4002'
Instance Attribute Summary collapse
-
#algod_host ⇒ Object
readonly
Returns the value of attribute algod_host.
-
#indexer_host ⇒ Object
readonly
Returns the value of attribute indexer_host.
-
#kmd_host ⇒ Object
readonly
Returns the value of attribute kmd_host.
Class Method Summary collapse
Instance Method Summary collapse
- #configure(options) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
16 17 18 |
# File 'lib/algorand/configuration.rb', line 16 def initialize set_defaults end |
Instance Attribute Details
#algod_host ⇒ Object (readonly)
Returns the value of attribute algod_host.
6 7 8 |
# File 'lib/algorand/configuration.rb', line 6 def algod_host @algod_host end |
#indexer_host ⇒ Object (readonly)
Returns the value of attribute indexer_host.
6 7 8 |
# File 'lib/algorand/configuration.rb', line 6 def indexer_host @indexer_host end |
#kmd_host ⇒ Object (readonly)
Returns the value of attribute kmd_host.
6 7 8 |
# File 'lib/algorand/configuration.rb', line 6 def kmd_host @kmd_host end |
Class Method Details
.set_defaults ⇒ Object
12 13 14 |
# File 'lib/algorand/configuration.rb', line 12 def self.set_defaults instance.set_defaults end |
Instance Method Details
#configure(options) ⇒ Object
20 21 22 23 24 |
# File 'lib/algorand/configuration.rb', line 20 def configure() @algod_host = [:algod_host] @indexer_host = [:indexer_host] @kmd_host = [:kmd_host] end |