Sha256: 178dd7d289949f208db7582c8f7faeada504a22a12e32ddb0d8357fe91cd5186
Contents?: true
Size: 517 Bytes
Versions: 14
Compression:
Stored size: 517 Bytes
Contents
# frozen_string_literal: true module Attractor # holds a churn/complexity value class Value attr_reader :file_path, :churn, :complexity def initialize(file_path: '', churn: 1, complexity: 0) @file_path = file_path @churn = churn @complexity = complexity end def to_s format('%-64s%8.1f%8i', @file_path, @complexity, @churn) end def to_h { file_path: file_path, x: churn, y: complexity } end def to_json(_opt) to_h.to_json end end end
Version data entries
14 entries across 14 versions & 1 rubygems