Class: Pubid::Asme::Identifier
- Inherits:
-
Identifier
- Object
- Lutaml::Model::Serializable
- Identifier
- Pubid::Asme::Identifier
- Defined in:
- lib/pubid/asme/identifier.rb
Class Method Summary collapse
-
.create(**opts) ⇒ Object
Factory that builds an ASME identifier from a hash of primitives.
- .parse(str) ⇒ Object
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_s, #to_supplement_s, #to_urn, #urn_supplement_type, #urn_type_code, #year
Constructor Details
This class inherits a constructor from Pubid::Identifier
Class Method Details
.create(**opts) ⇒ Object
Factory that builds an ASME identifier from a hash of primitives. Default is Pubid::Asme::Identifiers::Standard. ASME’s Code Component has ‘:designator` (leading letters, e.g. “B”) and `:number` (rest, e.g. “16.34”); `.create` accepts either an already-split pair or a combined `:code` string which it splits at the first digit.
19 20 21 |
# File 'lib/pubid/asme/identifier.rb', line 19 def self.create(**opts) Identifiers::Standard.new(**coerce_create_attrs(opts)) end |