Module: Rack::DomainFilter::ConfigurationDSL

Included in:
Configuration
Defined in:
lib/rack/domain_filter/ext/configuration.rb

Instance Method Summary collapse

Instance Method Details

#after_request(&block) ⇒ Object



9
10
11
# File 'lib/rack/domain_filter/ext/configuration.rb', line 9

def after_request(&block)
  @after_requests_list << block
end

#catch(klazz, &block) ⇒ Object



13
14
15
# File 'lib/rack/domain_filter/ext/configuration.rb', line 13

def catch(klazz, &block)
  @exception_catcher_mapping[klazz] = block
end

#filter_for(pattern, &block) ⇒ Object



5
6
7
# File 'lib/rack/domain_filter/ext/configuration.rb', line 5

def filter_for(pattern, &block)
  @uri_mapping[pattern] = block
end

#no_match(&block) ⇒ Object



17
18
19
20
21
# File 'lib/rack/domain_filter/ext/configuration.rb', line 17

def no_match(&block)
  raise 'Only allowed 1 no_match block!' if !@no_match.nil?

  @no_match = block
end

#skip_path_for(pattern) ⇒ Object



23
24
25
# File 'lib/rack/domain_filter/ext/configuration.rb', line 23

def skip_path_for(pattern)
  @skip_path_patterns << pattern
end