Sha256: 8b51c670bb19c39f170ca1192afe427d6cc62fd90ba38322c88f7d2548009d25
Contents?: true
Size: 1.02 KB
Versions: 9
Compression:
Stored size: 1.02 KB
Contents
require "metric_fu/constantize" module MetricFu module Formatter BUILTIN_FORMATS = { "html" => ["MetricFu::Formatter::HTML", "Generates a templated HTML report using the configured template class and graph engine."], "yaml" => ["MetricFu::Formatter::YAML", "Generates the raw output as yaml"] } DEFAULT = [[:html]] class << self include MetricFu::Constantize def class_for(format) if (builtin = BUILTIN_FORMATS[format.to_s]) constantize(builtin[0]) else constantize(format.to_s) end end end module Templates MetricFu.lib_require { "templates/metrics_template" } module_function def templates_configuration=(templates_configuration) @templates_configuration = templates_configuration end def option(name) templates_configuration.option(name) end def templates_configuration @templates_configuration ||= MetricFu::Templates::Configuration.new end end end end
Version data entries
9 entries across 9 versions & 3 rubygems