Class: Pubid::Components::Locality

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Defined in:
lib/pubid/components/locality.rb

Overview

Locality marker (e.g. “all parts”)

Renders the human-readable phrase “(all parts)” and a URN suffix that completes the locality segment.

Instance Method Summary collapse

Instance Method Details

#render(context: nil) ⇒ Object



12
13
14
15
16
# File 'lib/pubid/components/locality.rb', line 12

def render(context: nil)
  return "all" if context&.urn?

  "(all parts)"
end