Class: Watobo::Gui::ResponseRulesCtrl

Inherits:
RulesTableCtrl
  • Object
show all
Defined in:
lib/watobo/gui/rewrite_rules_dialog.rb

Instance Attribute Summary

Attributes inherited from RulesTableCtrl

#target

Instance Method Summary collapse

Constructor Details

#initialize(owner, target, opts) ⇒ ResponseRulesCtrl

Returns a new instance of ResponseRulesCtrl.



154
155
156
157
158
159
160
# File 'lib/watobo/gui/rewrite_rules_dialog.rb', line 154

def initialize(owner, target, opts)
  super owner, target, opts
  add_action :rewrite
  add_location :body
  add_location :header
  add_location :replace_all        
end

Instance Method Details

#open_filter_dialogObject



162
163
164
165
166
167
168
169
170
171
# File 'lib/watobo/gui/rewrite_rules_dialog.rb', line 162

def open_filter_dialog
   rule = @target.current_rule
  return false if rule.nil?
  dlg = Watobo::Gui::ResponseFilterDialog.new( self, rule )
  if dlg.execute != 0 then
  # TODO: Apply interceptor settings
  rule.set_filter dlg.filter
  @target.reset_table
  end
end