Class: CocinaDisplay::Geospatial::CoordinatesParser
- Inherits:
-
Object
- Object
- CocinaDisplay::Geospatial::CoordinatesParser
- Defined in:
- lib/cocina_display/geospatial.rb
Overview
Base class for parsers that convert strings into Coordinates objects. Subclasses must define at least the PATTERN constant and self.parse method.
Direct Known Subclasses
Constant Summary collapse
- PATTERN =
nil
Class Method Summary collapse
-
.supports?(input_str) ⇒ Boolean
If true, use this parser for the given input string.
Class Method Details
.supports?(input_str) ⇒ Boolean
If true, use this parser for the given input string.
225 226 227 |
# File 'lib/cocina_display/geospatial.rb', line 225 def self.supports?(input_str) input_str.match?(self::PATTERN) end |