blob: d75b1c1eb3e5a64c5a2ecf43adb3c9e9800828da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
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
require File.join(File.dirname(__FILE__), 'formatters', 'abstract.rb')
Dir[File.join(File.dirname(__FILE__), 'formatters', '*.rb')].each do |file|
require file
end
|