Module: Pubid::Iho::Identifier
- Extended by:
- Core::Identifier
- Defined in:
- lib/pubid/iho/identifier.rb,
lib/pubid/iho/identifier/base.rb
Defined Under Namespace
Classes: Base
Class Method Summary collapse
Class Method Details
.parse(*args) ⇒ Object
7 8 9 |
# File 'lib/pubid/iho/identifier.rb', line 7 def parse(*args) Base.parse(*args) end |
.resolve_identifier(parameters = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/pubid/iho/identifier.rb', line 11 def resolve_identifier(parameters = {}) return @config.default_type.new(**parameters) if parameters[:type].nil? @config.types.each do |identifier_type| if identifier_type.type_match?(parameters) return identifier_type.new(**parameters.reject { |k, _| k == :type }) end end @config.default_type.new(**parameters) end |