Module: English::Patterns
- Defined in:
- lib/gems/english-0.3.1/lib/english/patterns.rb
Overview
Patterns Function Module
Returns a Regexp pattern based on the given pattern string or symbolic name.
They are also recognizied in plural form.
Class Method Summary collapse
-
.char ⇒ Object
(also: chars, character, characters)
Character.
-
.line ⇒ Object
(also: lines)
Line.
-
.sentence ⇒ Object
Sentence FIXME.
-
.word ⇒ Object
(also: words)
Word.
Class Method Details
.char ⇒ Object Also known as: chars, character, characters
Character
16 17 18 |
# File 'lib/gems/english-0.3.1/lib/english/patterns.rb', line 16 def char // end |
.line ⇒ Object Also known as: lines
Line
34 35 36 |
# File 'lib/gems/english-0.3.1/lib/english/patterns.rb', line 34 def line /\Z/ end |
.sentence ⇒ Object
Sentence FIXME
42 43 44 |
# File 'lib/gems/english-0.3.1/lib/english/patterns.rb', line 42 def sentence /[.]\ / end |
.word ⇒ Object Also known as: words
Word
26 27 28 |
# File 'lib/gems/english-0.3.1/lib/english/patterns.rb', line 26 def word /\s+|\Z/ end |