Sha256: e04664a555ca5c72bae7a1d4d32c482e48f9469f176eca8d568e8b9fb549ed6f
Contents?: true
Size: 312 Bytes
Versions: 2
Compression:
Stored size: 312 Bytes
Contents
# frozen_string_literal: true require 'json' # Generate pretty JSON from list of variants class JSONConverter def to_json(_options = {}) hash = {} instance_variables.each do |var| key = var.to_s[1..] hash[key] = instance_variable_get(var) end JSON.pretty_generate(hash) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
danger-app_size_report-1.1.0 | lib/converter/helper/json_converter.rb |
danger-app_size_report-1.0.0 | lib/converter/helper/json_converter.rb |