class Nanoc::Core::OutdatednessStatus
@api private
Attributes
props[R]
reasons[R]
Public Class Methods
new(reasons: [], props: Nanoc::Core::DependencyProps.new)
click to toggle source
# File lib/nanoc/core/outdatedness_status.rb, line 10 def initialize(reasons: [], props: Nanoc::Core::DependencyProps.new) @reasons = reasons @props = props end
Public Instance Methods
update(reason)
click to toggle source
# File lib/nanoc/core/outdatedness_status.rb, line 19 def update(reason) self.class.new( reasons: @reasons + [reason], props: @props.merge(reason.props), ) end
useful_to_apply?(rule)
click to toggle source
# File lib/nanoc/core/outdatedness_status.rb, line 15 def useful_to_apply?(rule) (rule.affected_props - @props.active).any? end