Sha256: 89bf997e460cf534335eaca202e9410d14c9f82c34b3fe5d6b8ac24d774b3eb9

Contents?: true

Size: 414 Bytes

Versions: 1

Compression:

Stored size: 414 Bytes

Contents

module Adhoq
  module Reporter
    autoload 'Xlsx', 'adhoq/reporter/xlsx'

    class << self
      def generate(execution)
        executor = Executor.new(execution.raw_sql)
        reporter = lookup(execution.report_format).new(executor.execute)

        reporter.build_report
      end

      def lookup(format)
        @map ||= {'xlsx' => Adhoq::Reporter::Xlsx}
        @map[format]
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
adhoq-0.0.3 lib/adhoq/reporter.rb