Module: ONIX::IdentifiersMethods::Gln
- Included in:
- Addressee, Entity, ONIX::Imprint, Sender
- Defined in:
- lib/onix/identifier.rb
Instance Method Summary collapse
-
#gln ⇒ String
GLN string identifier from identifiers.
-
#gln_identifier ⇒ Object
private.
Instance Method Details
#gln ⇒ String
GLN string identifier from identifiers
116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/onix/identifier.rb', line 116 def gln if gln_identifier if gln_identifier.value =~ /\d{13}/ gln_identifier.value else # puts "WARN Invalid GLN #{gln_identifier.value}" nil end else nil end end |
#gln_identifier ⇒ Object
private
130 131 132 |
# File 'lib/onix/identifier.rb', line 130 def gln_identifier self.identifiers.select { |id| id.type.human == "Gln" }.first end |