Class: GOM::Storage::Remover
- Inherits:
-
Object
- Object
- GOM::Storage::Remover
- Defined in:
- lib/gom/storage/remover.rb
Overview
Removes an object from the storage.
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#object ⇒ Object
readonly
Returns the value of attribute object.
Instance Method Summary collapse
-
#initialize(object_or_id) ⇒ Remover
constructor
A new instance of Remover.
- #perform ⇒ Object
Constructor Details
#initialize(object_or_id) ⇒ Remover
Returns a new instance of Remover.
8 9 10 11 12 |
# File 'lib/gom/storage/remover.rb', line 8 def initialize(object_or_id) @object, @id = object_or_id.is_a?(GOM::Object::Id) ? [ nil, object_or_id ] : [ object_or_id, nil ] end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/gom/storage/remover.rb', line 6 def id @id end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
5 6 7 |
# File 'lib/gom/storage/remover.rb', line 5 def object @object end |
Instance Method Details
#perform ⇒ Object
14 15 16 17 18 |
# File 'lib/gom/storage/remover.rb', line 14 def perform check_mapping remove_object remove_mapping end |