Class: RaiblocksRpc::Response
- Inherits:
-
Hash
- Object
- Hash
- RaiblocksRpc::Response
- Includes:
- Hashie::Extensions::IndifferentAccess, Hashie::Extensions::MergeInitializer, Hashie::Extensions::MethodAccess
- Defined in:
- lib/raiblocks_rpc/response.rb
Instance Method Summary collapse
- #coerce_integers ⇒ Object
-
#initialize(hash = {}) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(hash = {}) ⇒ Response
Returns a new instance of Response.
9 10 11 12 |
# File 'lib/raiblocks_rpc/response.rb', line 9 def initialize(hash = {}) super coerce_integers end |
Instance Method Details
#coerce_integers ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/raiblocks_rpc/response.rb', line 14 def coerce_integers merge!(self) do |_k, v| Integer(v) rescue ArgumentError v end end |