Sha256: 9919f8d32f82099c79ac756d35f4eec8eb71590bd1214f7255944a4f9ea148e5
Contents?: true
Size: 545 Bytes
Versions: 18
Compression:
Stored size: 545 Bytes
Contents
# frozen_string_literal: true class NodeMutation::Result attr_accessor :file_path, :new_source, :actions attr_reader :actions def initialize(affected:, conflicted:) @affected = affected @conflicted = conflicted @actions = [] end def affected? @affected end def conflicted? @conflicted end def to_json(*args) data = { affected: affected?, conflicted: conflicted? } data[:new_source] = new_source if new_source data[:actions] = actions unless actions.empty? data.to_json(*args) end end
Version data entries
18 entries across 18 versions & 1 rubygems