Class: Pubid::Oiml::SupplementIdentifier

Inherits:
Identifier show all
Defined in:
lib/pubid/oiml/supplement_identifier.rb

Direct Known Subclasses

Identifiers::Amendment, Identifiers::Annex

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Identifier

#to_urn

Methods inherited from Identifier

#base_identifier, #eql?, #exclude, #hash, #initialize, #mr_number, #mr_number_with_part, #mr_part, #mr_publisher, #mr_type, #mr_year, #new_edition_of?, polymorphic_name, #render, #resolve_urn_generator, #root, #to_mr_string, #to_supplement_s, #to_urn, #urn_supplement_type, #urn_type_code, #year

Constructor Details

This class inherits a constructor from Pubid::Identifier

Instance Attribute Details

#requested_formatObject (readonly)

Track supplement’s parsed format



15
16
17
# File 'lib/pubid/oiml/supplement_identifier.rb', line 15

def requested_format
  @requested_format
end

Instance Method Details

#supplement_typeObject

Subclasses override this

Raises:

  • (NotImplementedError)


23
24
25
# File 'lib/pubid/oiml/supplement_identifier.rb', line 23

def supplement_type
  raise NotImplementedError, "Subclasses must implement supplement_type"
end

#to_s(format: nil, **opts) ⇒ Object



17
18
19
20
# File 'lib/pubid/oiml/supplement_identifier.rb', line 17

def to_s(format: nil, **opts)
  @requested_format = format
  render(format: :human, **opts)
end