Class: Tack::TestPattern
- Inherits:
-
Regexp
- Object
- Regexp
- Tack::TestPattern
- Defined in:
- lib/tack/test_pattern.rb
Constant Summary collapse
- DEFAULT =
/.*/
Instance Method Summary collapse
-
#initialize(pattern = nil) ⇒ TestPattern
constructor
A new instance of TestPattern.
Constructor Details
#initialize(pattern = nil) ⇒ TestPattern
Returns a new instance of TestPattern.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/tack/test_pattern.rb', line 7 def initialize(pattern=nil) pattern = case pattern when nil DEFAULT when String, Regexp pattern else DEFAULT end super(pattern) end |