Public Class methods
disable!()
[show source]
# File lib/httpx/adapters/webmock.rb 194 def disable! 195 return unless @original_session 196 197 HTTPX.send(:remove_const, :Session) 198 HTTPX.send(:const_set, :Session, @original_session) 199 end
enable!()
[show source]
# File lib/httpx/adapters/webmock.rb 185 def enable! 186 @original_session ||= HTTPX::Session 187 188 webmock_session = HTTPX.plugin(Plugin) 189 190 HTTPX.send(:remove_const, :Session) 191 HTTPX.send(:const_set, :Session, webmock_session.class) 192 end