2018-10-06 19:10:08 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-05-26 07:16:43 -04:00
|
|
|
module Banzai
|
|
|
|
module ReferenceParser
|
|
|
|
# Returns the reference parser class for the given type
|
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
|
|
|
# Banzai::ReferenceParser['issue']
|
|
|
|
#
|
|
|
|
# This would return the `Banzai::ReferenceParser::IssueParser` class.
|
|
|
|
def self.[](name)
|
2019-10-15 23:06:12 -04:00
|
|
|
const_get("#{name.to_s.camelize}Parser", false)
|
2016-05-26 07:16:43 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|