Class: EPUB::Metadata::Identifier
Constant Summary
Constants included from Refinee
Instance Attribute Summary collapse
Attributes inherited from DCMES
Attributes included from Refinee
Instance Method Summary collapse
Methods inherited from DCMES
Instance Attribute Details
#scheme ⇒ Object
TODO:
Define and include OPF module for opf:scheme attribute
TODO:
Define general way to handle with identifier-type refiners
Note:
This is ad-hoc
111 112 113 |
# File 'lib/epub/metadata.rb', line 111 def scheme @scheme end |
Instance Method Details
#isbn? ⇒ Boolean
TODO:
Define and include OPF module for opf:scheme attribute
TODO:
Define general way to handle with identifier-type refiners
Note:
This is ad-hoc
116 117 118 119 120 121 122 123 124 |
# File 'lib/epub/metadata.rb', line 116 def isbn? scheme == 'ISBN' or content.to_s.downcase.start_with? 'urn:isbn' or refiners.any? {|refiner| refiner.property == 'identifier-type' and refiner.scheme == 'onix:codelist5' and %w[02 15].include? refiner.content } end |