Class: Listen::Silencer::Controller
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/listen-3.8.0/lib/listen/silencer/controller.rb
Instance Method Summary collapse
- #append_ignores(*regexps) ⇒ Object
-
#initialize(silencer, default_options) ⇒ Controller
constructor
A new instance of Controller.
- #replace_with_bang_ignores(regexps) ⇒ Object
- #replace_with_only(regexps) ⇒ Object
Constructor Details
#initialize(silencer, default_options) ⇒ Controller
Returns a new instance of Controller.
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/listen-3.8.0/lib/listen/silencer/controller.rb', line 6 def initialize(silencer, ) @silencer = silencer opts = @prev_silencer_options = {} rules = [:only, :ignore, :ignore!].map do |option| [option, opts[option]] if opts.key? option end _reconfigure_silencer(Hash[rules.compact]) end |
Instance Method Details
#append_ignores(*regexps) ⇒ Object
19 20 21 22 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/listen-3.8.0/lib/listen/silencer/controller.rb', line 19 def append_ignores(*regexps) prev_ignores = Array(@prev_silencer_options[:ignore]) _reconfigure_silencer(ignore: [prev_ignores + regexps]) end |
#replace_with_bang_ignores(regexps) ⇒ Object
24 25 26 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/listen-3.8.0/lib/listen/silencer/controller.rb', line 24 def replace_with_bang_ignores(regexps) _reconfigure_silencer(ignore!: regexps) end |
#replace_with_only(regexps) ⇒ Object
28 29 30 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/listen-3.8.0/lib/listen/silencer/controller.rb', line 28 def replace_with_only(regexps) _reconfigure_silencer(only: regexps) end |