class PacketThief::RedirectRule

Attributes

handler[RW]
redirectspec[RW]
rulespec[RW]

Public Class Methods

new(handler) click to toggle source
# File lib/packetthief/redirect_rule.rb, line 8
def initialize(handler)
  @handler = handler
end

Public Instance Methods

redirect(args) click to toggle source
# File lib/packetthief/redirect_rule.rb, line 19
def redirect(args)
  rule = clone
  rule.redirectspec = args
  rule
end
run() click to toggle source
# File lib/packetthief/redirect_rule.rb, line 25
def run
  @handler.run(self)
end
where(args) click to toggle source

specify an original destination

# File lib/packetthief/redirect_rule.rb, line 13
def where(args)
  rule = clone
  rule.rulespec = args
  rule
end