Class: CocinaDisplay::Geospatial::CoordinatesParser

Inherits:
Object
  • Object
show all
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.

Constant Summary collapse

PATTERN =
nil

Class Method Summary collapse

Class Method Details

.supports?(input_str) ⇒ Boolean

If true, use this parser for the given input string.

Parameters:

  • input_str (String)

Returns:

  • (Boolean)


335
336
337
# File 'lib/cocina_display/geospatial.rb', line 335

def self.supports?(input_str)
  input_str.match?(self::PATTERN)
end