Sha256: d31305190fb8c49209ed4c31c2429fd87be850e665c3818303936d3aeacc3e59

Contents?: true

Size: 404 Bytes

Versions: 3

Compression:

Stored size: 404 Bytes

Contents

module Bidu
  module House
    class ReportBuilder
      def build(key, parameters = {})
        params = parameters.slice(:period, :threshold)
        config = configs[key].merge(params)
        Bidu::House::ErrorReport.new(config)
      end

      def add_config(key, config)
        configs[key] = config
      end

      private

      def configs
        @configs ||= {}
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bidu-house-0.1.2 lib/bidu/house/report_builder.rb
bidu-house-0.1.1 lib/bidu/house/report_builder.rb
bidu-house-0.1.0 lib/bidu/house/report_builder.rb