As an API client developer, I want to be able to inject certain functionality into steem-ruby, so I don't have to resort to monkeypatching.
At the moment, steem-ruby has a modular design to allow other gems to replace things like the RPC Client. But in order to do this, these gems will have to use monkeypatching. One gem that does this is steem-mechanize.
The steem-mechanize gem provides exactly one feature. It replaces the RPC Client a specialized singleton. The way steem-mechanize does this is with this bit of code that runs when the gem is required:
module Steem
class Api
def self.default_rpc_client_class
Steem::Mechanize::RPC::MechanizeClient
end
end
end
As an API client developer, I want to be able to inject certain functionality into
steem-ruby
, so I don't have to resort to monkeypatching.At the moment,
steem-ruby
has a modular design to allow other gems to replace things like the RPC Client. But in order to do this, these gems will have to use monkeypatching. One gem that does this issteem-mechanize
.The
steem-mechanize
gem provides exactly one feature. It replaces the RPC Client a specialized singleton. The waysteem-mechanize
does this is with this bit of code that runs when the gem is required:Instead, support for this idiom is better:
AC
Steem::Api
for providing a default rpc client class.