Sha256: 6ce2d41be3e850e5da317fb595a0f6aea27adeadb0fdf2c3fdf800e2bd570c7b
Contents?: true
Size: 563 Bytes
Versions: 6
Compression:
Stored size: 563 Bytes
Contents
require 'treetop' require 'grammar' module ParseAChangelog class ParseError < StandardError; end class << self def parse(file_path) file = File.read(file_path) parser = KeepAChangelogParser.new result = parser.parse(file) unless result raise parser_error( parser.failure_line, parser.failure_column, parser.failure_reason ) end result end def parser_error(line, column, reason) ParseError.new("line #{line}, column #{column}: #{reason}") end end end
Version data entries
6 entries across 6 versions & 1 rubygems