Class: Pubid::Isbn::Parser
- Inherits:
-
Parslet::Parser
- Object
- Parslet::Parser
- Pubid::Isbn::Parser
- Defined in:
- lib/pubid/isbn/parser.rb
Overview
Parslet grammar for ISBN identifiers per ISO 2108.
Accepts:
[ISBN[ |:]] {10 or 13 digits with optional hyphens}
ISBN-10 final digit may be "X" (check digit value 10). Hyphens are optional and may appear in any group position; they are preserved for round-trip rendering.
Class Method Summary collapse
Class Method Details
.parse(input) ⇒ Object
40 41 42 |
# File 'lib/pubid/isbn/parser.rb', line 40 def self.parse(input) new.parse(input) end |