Class: Shoulda::Matchers::Text
- Inherits:
-
String
- Object
- String
- Shoulda::Matchers::Text
- Defined in:
- lib/shoulda/matchers/util/word_wrap.rb
Constant Summary collapse
- LIST_ITEM_REGEXP =
/\A((?:[a-z0-9]+(?:\)|\.)|\*) )/.freeze
Instance Method Summary collapse
Instance Method Details
#indented? ⇒ Boolean
46 47 48 |
# File 'lib/shoulda/matchers/util/word_wrap.rb', line 46 def indented? self =~ /\A +/ end |
#list_item? ⇒ Boolean
50 51 52 |
# File 'lib/shoulda/matchers/util/word_wrap.rb', line 50 def list_item? self =~ LIST_ITEM_REGEXP end |
#match_as_list_item ⇒ Object
54 55 56 |
# File 'lib/shoulda/matchers/util/word_wrap.rb', line 54 def match_as_list_item match(LIST_ITEM_REGEXP) end |