2018-12-13 13:39:08 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-06-16 23:09:34 +05:30
|
|
|
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-12-21 20:55:43 +05:30
|
|
|
const_get("#{name.to_s.camelize}Parser", false)
|
2016-06-16 23:09:34 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|