Sha256: cdd97f48fe9c1e9f6319906205a0c00b1a19291f6abff67eaa431f943a82c227
Contents?: true
Size: 771 Bytes
Versions: 47
Compression:
Stored size: 771 Bytes
Contents
# frozen_string_literal: true module GitlabQuality module TestTooling module TestMetric class JsonTestMetric attr_reader :metric def initialize(metric) @metric = metric end def name metric.fetch('name') end def time metric.fetch('time') end def tags @tags ||= metric.fetch('tags') end def fields @fields ||= metric.fetch('fields') end def to_json(*options) as_json.to_json(*options) end private def as_json { name: name, time: time, tags: tags, fields: fields } end end end end end
Version data entries
47 entries across 47 versions & 1 rubygems