Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/patento.rb
Overview
Some quick string regex helpers
Instance Method Summary collapse
-
#is_independent? ⇒ Boolean
identifiers if the text has “ claim N ” in it note this is not foolproof since some claims aren’t worded this way (few, but some).
-
#is_preamble? ⇒ Boolean
identifies if the text contains “N.
Instance Method Details
#is_independent? ⇒ Boolean
identifiers if the text has “ claim N ” in it note this is not foolproof since some claims aren’t worded this way (few, but some)
27 28 29 |
# File 'lib/patento.rb', line 27 def is_independent? self.match(/\sclaim\s\d*\s/) ? true : false end |
#is_preamble? ⇒ Boolean
identifies if the text contains “N. …” where N is the claim number
21 22 23 |
# File 'lib/patento.rb', line 21 def is_preamble? self.match(/^\d*\.\s/) ? true : false end |