Class: Apache::RedirectMatchPermanent
- Inherits:
-
MatchableThing
- Object
- MatchableThing
- Apache::RedirectMatchPermanent
- Includes:
- RegularExpressionMatcher
- Defined in:
- lib/apache/rewrites.rb
Overview
A permanent RedirectMatch
Instance Attribute Summary
Attributes inherited from MatchableThing
Instance Method Summary collapse
- #require_regexp? ⇒ Boolean
-
#rule(from, to) ⇒ Object
Define a RedirectMatch rule.
-
#stop_if_match ⇒ Object
Stop rewrite testing if this object matches.
-
#tag ⇒ Object
The Apache directive for this object.
-
#to_s ⇒ Object
Convert this tag to a String.
Methods included from RegularExpressionMatcher
Methods inherited from MatchableThing
#forbidden?, #from_tester, #initialize, #stop_if_match?, #to_a
Constructor Details
This class inherits a constructor from Apache::MatchableThing
Instance Method Details
#require_regexp? ⇒ Boolean
339 |
# File 'lib/apache/rewrites.rb', line 339 def require_regexp?; true; end |
#rule(from, to) ⇒ Object
Define a RedirectMatch rule.
326 327 328 329 330 |
# File 'lib/apache/rewrites.rb', line 326 def rule(from, to) super(from, to) raise "from must be a Regexp" if !from.kind_of?(Regexp) end |
#stop_if_match ⇒ Object
Stop rewrite testing if this object matches.
338 |
# File 'lib/apache/rewrites.rb', line 338 def stop_if_match; true; end |
#tag ⇒ Object
The Apache directive for this object.
323 |
# File 'lib/apache/rewrites.rb', line 323 def tag; 'RedirectMatch permanent'; end |
#to_s ⇒ Object
Convert this tag to a String.
333 334 335 |
# File 'lib/apache/rewrites.rb', line 333 def to_s "#{tag} #{[@from.source, @to].quoteize.compact.flatten * " "}" end |