summaryrefslogtreecommitdiff
path: root/lib/banzai/reference_parser.rb
blob: 557bec4316e45fc10856799e54d919f5fb776be7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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)
      const_get("#{name.to_s.camelize}Parser")
    end
  end
end