Welcome to mirror list, hosted at ThFree Co, Russian Federation.

formatters.rb « twine « lib - github.com/mapsme/twine.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 49f4aa551ad62de9085e7cba847c48c81691add0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
module Twine
  module Formatters
    @formatters = []

    class << self
      attr_reader :formatters

      ###
      # registers a new formatter
      #
      # formatter_class - the class of the formatter to register
      #
      # returns array of active formatters
      #
      def register_formatter formatter_class
        @formatters << formatter_class.new
      end
    end
  end
end