Module: Centro::Canonical::InstanceMethods

Defined in:
lib/canonical-email.rb

Overview

ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



129
130
131
132
# File 'lib/canonical-email.rb', line 129

def self.included(base)
  base.send(:alias_method, :destinations_without_canonical, :destinations)
  base.send(:alias_method, :destinations, :canonical_destinations)
end

Instance Method Details

#canonical_destinationsObject



123
124
125
126
127
# File 'lib/canonical-email.rb', line 123

def canonical_destinations
  self.destinations_without_canonical.collect do |email|
    self.class.canonical_destination(email)
  end.uniq
end