Class: Celerity::IgnoringWebConnection

Inherits:
HtmlUnit::Util::FalsifyingWebConnection
  • Object
show all
Defined in:
lib/celerity/ignoring_web_connection.rb

Method Summary

Constructor Details

- (IgnoringWebConnection) initialize(web_client, pattern)

A new instance of IgnoringWebConnection

Returns:



4
5
6
7
# File 'lib/celerity/ignoring_web_connection.rb', line 4

def initialize(web_client, pattern)
  super(web_client)
  @pattern = pattern
end

Method Details

- (Object) getResponse(request_settings)



9
10
11
12
# File 'lib/celerity/ignoring_web_connection.rb', line 9

def getResponse(request_settings)
  return super unless request_settings.getUrl.toString =~ @pattern
  createWebResponse(request_settings, "", "text/html")
end