Method: VirtualBox::AbstractModel#destroy
- Defined in:
- lib/virtualbox/abstract_model.rb
#destroy(*args) ⇒ Object
Destroys the model. The exact behaviour of this method is expected to be defined on the subclasses. This method on AbstractModel simply propagates the destroy to the dependent relationships. For more information on relationships, see Relatable.
236 237 238 239 240 241 |
# File 'lib/virtualbox/abstract_model.rb', line 236 def destroy(*args) # Destroy dependent relationships self.class.relationships.each do |name, | destroy_relationship(name, *args) if [:dependent] == :destroy end end |