Class: Voucher::Config
- Inherits:
-
Object
- Object
- Voucher::Config
- Defined in:
- lib/voucher/config.rb
Constant Summary collapse
- ABI_FILE_NAME =
File.join(File.dirname(__FILE__), 'config', 'json', 'election.json')
Instance Attribute Summary collapse
-
#election_abi ⇒ Object
Returns the value of attribute election_abi.
-
#ethereum_url ⇒ Object
Returns the value of attribute ethereum_url.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
9 10 11 12 |
# File 'lib/voucher/config.rb', line 9 def initialize @ethereum_url = ENV['ETHEREUM_URL'] || 'http://172.31.80.135:8545' @election_abi = File.read(ABI_FILE_NAME) end |
Instance Attribute Details
#election_abi ⇒ Object
Returns the value of attribute election_abi.
7 8 9 |
# File 'lib/voucher/config.rb', line 7 def election_abi @election_abi end |
#ethereum_url ⇒ Object
Returns the value of attribute ethereum_url.
7 8 9 |
# File 'lib/voucher/config.rb', line 7 def ethereum_url @ethereum_url end |