Class: Ethlite::Configuration
- Inherits:
-
Object
- Object
- Ethlite::Configuration
- Defined in:
- lib/ethlite.rb
Instance Method Summary collapse
- #debug=(value) ⇒ Object
-
#debug? ⇒ Boolean
add “global” debug switch - why? why not?.
- #rpc ⇒ Object
- #rpc=(value) ⇒ Object
Instance Method Details
#debug=(value) ⇒ Object
55 |
# File 'lib/ethlite.rb', line 55 def debug=(value) @debug = value; end |
#debug? ⇒ Boolean
add “global” debug switch - why? why not?
54 |
# File 'lib/ethlite.rb', line 54 def debug?() (@debug || false) == true; end |
#rpc ⇒ Object
44 |
# File 'lib/ethlite.rb', line 44 def rpc() @rpc ||= JsonRpc.new( ENV['INFURA_URI'] ); end |
#rpc=(value) ⇒ Object
45 46 47 48 49 50 51 |
# File 'lib/ethlite.rb', line 45 def rpc=(value) @rpc = if value.is_a?( String ) JsonRpc.new( value ) ## auto-wrap in (built-in/simple) jsonrpc client/serverproxy else value end end |