Class: Pubid::Api::Identifier

Inherits:
Object
  • Object
show all
Defined in:
lib/pubid/api/identifier.rb

Class Method Summary collapse

Class Method Details

.parse(input) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/pubid/api/identifier.rb', line 10

def self.parse(input)
  # Filter out comments
  return nil if input.start_with?("#")

  tree = Parser.new.parse(input)
  Builder.new.build(tree)
rescue Parslet::ParseFailed => e
  raise e
end