class Shanty::Mutator
Public: enables mutation of the project graph Common usage would be to set changed flags on projects
Attributes
mutators[R]
env[R]
graph[R]
Public Class Methods
inherited(mutator)
click to toggle source
# File lib/shanty/mutator.rb, line 18 def self.inherited(mutator) Util.logger.debug("Detected mutator #{mutator}") @mutators ||= [] @mutators << mutator end
new(env, graph)
click to toggle source
# File lib/shanty/mutator.rb, line 13 def initialize(env, graph) @env = env @graph = graph end
Public Instance Methods
apply_mutations()
click to toggle source
# File lib/shanty/mutator.rb, line 24 def apply_mutations self.class.mutators.each do |mutator| mutator.new(@env, @graph).mutate end end