Class: ActiveMutator::Operators::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/active_mutator/operators/base.rb

Constant Summary collapse

REGISTRY =
[]

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.allObject



11
# File 'lib/active_mutator/operators/base.rb', line 11

def self.all = REGISTRY.map(&:new)

.inherited(klass) ⇒ Object



6
7
8
9
# File 'lib/active_mutator/operators/base.rb', line 6

def self.inherited(klass)
  super
  REGISTRY << klass
end

Instance Method Details

#edits(node) ⇒ Object

Returns [Edit] for this node, or [] when the operator does not apply.



14
# File 'lib/active_mutator/operators/base.rb', line 14

def edits(node) = []