public
Rubygem
Description: Merb Core: All you need. None you don't.
Homepage: http://www.merbivore.com
Clone URL: git://github.com/wycats/merb-core.git
Search Repo:
add in string so that @element.contains? will work when @element is a 
string and not just Hpricot::Elem

Signed-off-by: Michael S. Klishin <michael@novemberain.com>
jackdempsey (author)
Sun May 11 09:35:45 -0700 2008
Michael S. Klishin (committer)
Sun May 11 10:09:36 -0700 2008
commit  4640df45006b4f0be2dccf45ff970d12762e364b
tree    26baf6009b4669bdf193707ccd0761ea107127d1
parent  b38c164be5ebda892ac73e9792b6a099f25270cf
...
2
3
4
 
5
6
7
...
2
3
4
5
6
7
8
0
@@ -2,6 +2,7 @@
0
 
0
 require 'merb-core/test/test_ext/hpricot'
0
 require 'merb-core/test/test_ext/object'
0
+require 'merb-core/test/test_ext/string'
0
 
0
 module Merb; module Test; end; end
0
 
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
0
@@ -1 +1,15 @@
0
+class String
0
+ def contain?(value)
0
+ self.include?(value)
0
+ end
0
+
0
+ alias_method :contains?, :contain?
0
+
0
+ def match?(regex)
0
+ self.match(regex)
0
+ end
0
+
0
+ alias_method :matches?, :match?
0
+
0
+end

Comments

    No one has commented yet.