Class: GOM::Storage::Saver

Inherits:
Object
  • Object
show all
Defined in:
lib/gom/storage/saver.rb

Overview

Stores an object to the storage.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object, storage_name = nil) ⇒ Saver

Returns a new instance of Saver.



8
9
10
# File 'lib/gom/storage/saver.rb', line 8

def initialize(object, storage_name = nil)
  @object, @storage_name = object, storage_name
end

Instance Attribute Details

#objectObject (readonly)

Returns the value of attribute object.



5
6
7
# File 'lib/gom/storage/saver.rb', line 5

def object
  @object
end

#storage_nameObject (readonly)

Returns the value of attribute storage_name.



6
7
8
# File 'lib/gom/storage/saver.rb', line 6

def storage_name
  @storage_name
end

Instance Method Details

#performObject



12
13
14
15
16
17
18
# File 'lib/gom/storage/saver.rb', line 12

def perform
  fetch_id
  update_storage_name
  inspect_object
  store_draft
  store_id
end