Class: CryptocoinPayable::Configuration
- Inherits:
-
Object
- Object
- CryptocoinPayable::Configuration
- Defined in:
- lib/cryptocoin_payable/config.rb
Defined Under Namespace
Classes: BchConfiguration, BtcConfiguration, CoinConfiguration, EthConfiguration
Instance Attribute Summary collapse
-
#bch ⇒ Object
Returns the value of attribute bch.
-
#btc ⇒ Object
Returns the value of attribute btc.
- #currency ⇒ Object
-
#eth ⇒ Object
Returns the value of attribute eth.
-
#expire_payments_after ⇒ Object
Returns the value of attribute expire_payments_after.
-
#request_delay ⇒ Object
Returns the value of attribute request_delay.
-
#testnet ⇒ Object
Returns the value of attribute testnet.
Instance Method Summary collapse
- #configure_bch {|@bch| ... } ⇒ Object
- #configure_btc {|@btc| ... } ⇒ Object
- #configure_eth {|@eth| ... } ⇒ Object
Instance Attribute Details
#bch ⇒ Object
Returns the value of attribute bch.
12 13 14 |
# File 'lib/cryptocoin_payable/config.rb', line 12 def bch @bch end |
#btc ⇒ Object
Returns the value of attribute btc.
12 13 14 |
# File 'lib/cryptocoin_payable/config.rb', line 12 def btc @btc end |
#currency ⇒ Object
15 16 17 |
# File 'lib/cryptocoin_payable/config.rb', line 15 def currency @currency ||= :usd end |
#eth ⇒ Object
Returns the value of attribute eth.
12 13 14 |
# File 'lib/cryptocoin_payable/config.rb', line 12 def eth @eth end |
#expire_payments_after ⇒ Object
Returns the value of attribute expire_payments_after.
12 13 14 |
# File 'lib/cryptocoin_payable/config.rb', line 12 def expire_payments_after @expire_payments_after end |
#request_delay ⇒ Object
Returns the value of attribute request_delay.
12 13 14 |
# File 'lib/cryptocoin_payable/config.rb', line 12 def request_delay @request_delay end |
#testnet ⇒ Object
Returns the value of attribute testnet.
12 13 14 |
# File 'lib/cryptocoin_payable/config.rb', line 12 def testnet @testnet end |
Instance Method Details
#configure_bch {|@bch| ... } ⇒ Object
24 25 26 27 |
# File 'lib/cryptocoin_payable/config.rb', line 24 def configure_bch @bch ||= BchConfiguration.new yield(@bch) end |
#configure_btc {|@btc| ... } ⇒ Object
19 20 21 22 |
# File 'lib/cryptocoin_payable/config.rb', line 19 def configure_btc @btc ||= BtcConfiguration.new yield(@btc) end |
#configure_eth {|@eth| ... } ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/cryptocoin_payable/config.rb', line 29 def configure_eth @eth ||= EthConfiguration.new yield(@eth) Eth.configure do |config| config.chain_id = CryptocoinPayable.configuration.testnet ? 4 : 1 end end |