Public Class methods
disable!()
[show source]
# File lib/httpx/adapters/webmock.rb 181 def disable! 182 return unless @original_session 183 184 HTTPX.send(:remove_const, :Session) 185 HTTPX.send(:const_set, :Session, @original_session) 186 end
enable!()
[show source]
# File lib/httpx/adapters/webmock.rb 172 def enable! 173 @original_session ||= HTTPX::Session 174 175 webmock_session = HTTPX.plugin(Plugin) 176 177 HTTPX.send(:remove_const, :Session) 178 HTTPX.send(:const_set, :Session, webmock_session.class) 179 end