Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/string_extensions.rb,
app/reporters/subversion_reporter.rb
Instance Method Summary collapse
Instance Method Details
#medialize ⇒ Object
23 24 25 |
# File 'lib/string_extensions.rb', line 23 def medialize MediaCloth::wiki_to_html self end |
#to_rev_num ⇒ Object
26 27 28 |
# File 'app/reporters/subversion_reporter.rb', line 26 def to_rev_num self.match(/\d+/)[0] end |
#xml_split ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/string_extensions.rb', line 27 def xml_split str = self words = [] while(md = str.match(/<([^>]+)(\s+[^>]+)?>.*?<\/\1>|[^\s<]+/m)) words << md[0] str = md.post_match end words end |