Class: Voucher::Config

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeConfig

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_abiObject

Returns the value of attribute election_abi.



7
8
9
# File 'lib/voucher/config.rb', line 7

def election_abi
  @election_abi
end

#ethereum_urlObject

Returns the value of attribute ethereum_url.



7
8
9
# File 'lib/voucher/config.rb', line 7

def ethereum_url
  @ethereum_url
end