Sha256: 28bc3c82217f9bcd8c17157ee916b39853cb08164df136cb81880fafceeeae8d
Contents?: true
Size: 1.32 KB
Versions: 12
Compression:
Stored size: 1.32 KB
Contents
# encoding: utf-8 module Hexx module Suit module Metrics class MetricFu < RSpec::Metrics::Base # Base class for metrics configured via metric_fu class Base < RSpec::Metrics::Base # Constructs the object and loads 'metric_fu' dependency # # @return [Hexx::Suit::Metrics::MetricFu] # # @api private def self.new require "metric_fu" super end # @!scope class # Initializes and configures the metric from a corresponding yml # # @return [self] def load configure { |metric| options.each { |option| add(metric, option) } } super end private # current metric definitions # @abstract def name end # @abstract def options end # helpers def add(metric, option) value = settings[option] metric.send option, value unless value.nil? end def configure ::MetricFu::Configuration.configure_metric(name) do |metric| yield(metric) end end end # class Base end # class MetricFu end # module Metrics end # module Suit end # module Hexx
Version data entries
12 entries across 12 versions & 1 rubygems