Class: RegAnd
- Inherits:
-
Object
- Object
- RegAnd
- Defined in:
- lib/eregex.rb
Instance Method Summary collapse
- #=~(str) ⇒ Object
-
#initialize(re1, re2) ⇒ RegAnd
constructor
A new instance of RegAnd.
Constructor Details
#initialize(re1, re2) ⇒ RegAnd
Returns a new instance of RegAnd.
15 16 17 18 |
# File 'lib/eregex.rb', line 15 def initialize(re1, re2) @re1 = re1 @re2 = re2 end |
Instance Method Details
#=~(str) ⇒ Object
20 21 22 |
# File 'lib/eregex.rb', line 20 def =~ (str) @re1 =~ str and @re2 =~ str end |