class EthereumEx::Client
Constants
- RPC_COMMANDS
- RPC_MANAGEMENT_COMMANDS
Attributes
command[RW]
id[RW]
log[RW]
logger[RW]
Public Class Methods
new(log = false)
click to toggle source
# File lib/ethereumex/client.rb, line 10 def initialize(log = false) @id = 0 @log = log @batch = nil if @log == true @logger = Logger.new("/tmp/ethereum_ruby_http.log") end end
Public Instance Methods
batch() { || ... }
click to toggle source
# File lib/ethereumex/client.rb, line 20 def batch @batch = [] yield result = send_batch(@batch) @batch = nil reset_id return result end
get_id()
click to toggle source
# File lib/ethereumex/client.rb, line 32 def get_id @id += 1 return @id end
reset_id()
click to toggle source
# File lib/ethereumex/client.rb, line 37 def reset_id @id = 0 end