lib/thinreports/generator.rb in thinreports-0.7.7 vs lib/thinreports/generator.rb in thinreports-0.8.0
- old
+ new
@@ -1,25 +1,23 @@
# coding: utf-8
-module ThinReports
+module Thinreports
module Generator
# @param [Symbol] type
- # @param report (see ThinReports::Generator::Base#initialize)
- # @param options (see ThinReports::Generator::Base#initialize)
+ # @param report (see Thinreports::Generator::Base#initialize)
+ # @param options (see Thinreports::Generator::Base#initialize)
def self.new(type, report, options = {})
unless generator = registry[type]
- raise ThinReports::Errors::UnknownGeneratorType.new(type)
+ raise Thinreports::Errors::UnknownGeneratorType.new(type)
end
generator.new(report, options)
end
-
- # @private
+
def self.register(type, generator)
registry[type] = generator
end
-
- # @private
+
def self.registry
@generators ||= {}
end
end
end