lib/request_log_analyzer/output.rb in wvanbergen-request-log-analyzer-1.1.0 vs lib/request_log_analyzer/output.rb in wvanbergen-request-log-analyzer-1.1.1

- old
+ new

@@ -1,15 +1,13 @@ -module RequestLogAnalyzer +module RequestLogAnalyzer::Output + + def self.const_missing(const) + RequestLogAnalyzer::load_default_class_file(self, const) + end - class Output + class Base attr_accessor :io, :options, :style - - def self.const_missing(const) - filename = const.to_s.gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').gsub(/([a-z\d])([A-Z])/,'\1_\2').tr("-", "_").downcase - require File.dirname(__FILE__) + '/output/' + filename - self.const_get(const) - end def initialize(io, options = {}) @io = io @options = options @style = options[:style] || { :cell_separator => true, :table_border => false }