Class: ZAPv2::Replacer
- Inherits:
-
Object
- Object
- ZAPv2::Replacer
- Defined in:
- lib/zap/v2apis/replacer.rb
Instance Method Summary collapse
- #add_rule(description, enabled, match_type, match_regex, match_string, replacement, initiators, url) ⇒ Object
-
#initialize(client) ⇒ Replacer
constructor
A new instance of Replacer.
- #remove_rule(description) ⇒ Object
- #rules ⇒ Object
- #set_enabled(description, bool) ⇒ Object
Constructor Details
#initialize(client) ⇒ Replacer
Returns a new instance of Replacer.
5 6 7 |
# File 'lib/zap/v2apis/replacer.rb', line 5 def initialize(client) @client = client end |
Instance Method Details
#add_rule(description, enabled, match_type, match_regex, match_string, replacement, initiators, url) ⇒ Object
13 14 15 |
# File 'lib/zap/v2apis/replacer.rb', line 13 def add_rule(description, enabled, match_type, match_regex, match_string, replacement, initiators, url) @client.get("/JSON/replacer/action/addRule/?description=#{description}&enabled=#{enabled}&matchType=#{match_type}&matchRegex=#{match_regex}&matchString=#{match_string}&replacement=#{replacement}&initiators=#{initiators}&url=#{url}") end |
#remove_rule(description) ⇒ Object
17 18 19 |
# File 'lib/zap/v2apis/replacer.rb', line 17 def remove_rule(description) @client.get("/JSON/replacer/action/removeRule/?description=#{description}") end |
#rules ⇒ Object
9 10 11 |
# File 'lib/zap/v2apis/replacer.rb', line 9 def rules @client.get('/JSON/replacer/view/rules/') end |
#set_enabled(description, bool) ⇒ Object
21 22 23 |
# File 'lib/zap/v2apis/replacer.rb', line 21 def set_enabled(description, bool) @client.get("/JSON/replacer/action/setEnabled/?description=#{description}&bool=#{bool}") end |