Sha256: d128b09c90b84e5348d23a42e37485d4b505d106f65cfe1a7d0b54960cf14967
Contents?: true
Size: 561 Bytes
Versions: 4
Compression:
Stored size: 561 Bytes
Contents
# frozen_string_literal: true module Nanoc module Int # @api private class OutdatednessStatus attr_reader :reasons attr_reader :props def initialize(reasons: [], props: Nanoc::Core::DependencyProps.new) @reasons = reasons @props = props end def useful_to_apply?(rule) (rule.affected_props - @props.active).any? end def update(reason) self.class.new( reasons: @reasons + [reason], props: @props.merge(reason.props), ) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems