Class: Regexp::NegRegexp

Inherits:
Object show all
Defined in:
lib/functional.rb

Instance Method Summary collapse

Constructor Details

#initialize(r) ⇒ NegRegexp

Returns a new instance of NegRegexp.



3
4
5
# File 'lib/functional.rb', line 3

def initialize r
	@rx = r
end

Instance Method Details

#-@Object



12
13
14
# File 'lib/functional.rb', line 12

def -@
	@rx
end

#=~(l) ⇒ Object



9
10
11
# File 'lib/functional.rb', line 9

def =~ l
	! @rx =~ l
end

#match(l) ⇒ Object



6
7
8
# File 'lib/functional.rb', line 6

def match l
	! @rx.match( l)
end