Method: Context#remove_existing_adaptation
- Defined in:
- lib/cop.rb
#remove_existing_adaptation(context_adaptation) ⇒ Object
142 143 144 145 146 |
# File 'lib/cop.rb', line 142 def remove_existing_adaptation(context_adaptation) raise Exception, "can't remove foreign adaptation" unless self == context_adaptation.context self.manager.deactivate_adaptation(context_adaptation) if self.active? raise Exception, "can't remove adaptation" if @adaptations.delete(context_adaptation).nil? end |