class EPUB::Publication::Package::Metadata::Identifier

Attributes

scheme[RW]

@note This is ad-hoc @todo Define and include OPF module for opf:scheme attribute @todo Define generale way to handle with identifier-type refiners

Public Instance Methods

isbn?() click to toggle source

@note This is ad-hoc @todo Define and include OPF module for opf:scheme attribute @todo Define generale way to handle with identifier-type refiners

# File lib/epub/publication/package/metadata.rb, line 103
def isbn?
  refiners.any? {|refiner|
    refiner.property == 'identifier-type' and
    refiner.scheme == 'onix:codelist5' and
    %w[02 15].include? refiner.content
  } or
  scheme == 'ISBN' or
  content.to_s.downcase.start_with? 'urn:isbn'
end