Class: Radiator::SSC::BaseSteemSmartContractRPC
- Inherits:
-
Object
- Object
- Radiator::SSC::BaseSteemSmartContractRPC
- Defined in:
- lib/radiator/ssc/base_steem_smart_contract_rpc.rb
Direct Known Subclasses
Constant Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ BaseSteemSmartContractRPC
constructor
A new instance of BaseSteemSmartContractRPC.
-
#shutdown ⇒ Object
Stops the persistant http connections.
Constructor Details
#initialize(options = {}) ⇒ BaseSteemSmartContractRPC
Returns a new instance of BaseSteemSmartContractRPC.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/radiator/ssc/base_steem_smart_contract_rpc.rb', line 10 def initialize( = {}) @root_url = [:root_url] || 'https://api.steem-engine.com/rpc' @self_hashie_logger = false @hashie_logger = if [:hashie_logger].nil? @self_hashie_logger = true Logger.new(nil) else [:hashie_logger] end unless @hashie_logger.respond_to? :warn @hashie_logger = Logger.new(@hashie_logger) end @reuse_ssl_sessions = if .keys.include? :reuse_ssl_sessions [:reuse_ssl_sessions] else true end if defined? Net::HTTP::Persistent::DEFAULT_POOL_SIZE @pool_size = [:pool_size] || Net::HTTP::Persistent::DEFAULT_POOL_SIZE end Hashie.logger = @hashie_logger @uri = nil @http_id = nil @http = nil @max_requests = [:max_requests] || 30 end |
Instance Method Details
#shutdown ⇒ Object
Stops the persistant http connections.
44 45 46 47 48 |
# File 'lib/radiator/ssc/base_steem_smart_contract_rpc.rb', line 44 def shutdown @uri = nil @http_id = nil @http = nil end |