Class: Pubid::Bsi::Parser
- Inherits:
-
Parslet::Parser
- Object
- Parslet::Parser
- Pubid::Bsi::Parser
- Defined in:
- lib/pubid/bsi/parser.rb
Class Method Summary collapse
Class Method Details
.parse(input) ⇒ Object
648 649 650 651 652 653 654 655 656 |
# File 'lib/pubid/bsi/parser.rb', line 648 def self.parse(input) # Normalize "BSI " to "BS " for consistency, but NOT for "BSI Flex" normalized = if input.start_with?("BSI Flex") input # Keep as is else input.gsub(/\bBSI\s+/, "BS ") end new.parse(normalized) end |