Class: GOM::Storage::Fetcher
- Inherits:
-
Object
- Object
- GOM::Storage::Fetcher
- Defined in:
- lib/gom/storage/fetcher.rb
Overview
Fetches a draft from the storage adapter and uses the cached builder to build an object from it.
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
Instance Method Summary collapse
-
#initialize(id) ⇒ Fetcher
constructor
A new instance of Fetcher.
- #object ⇒ Object
Constructor Details
#initialize(id) ⇒ Fetcher
Returns a new instance of Fetcher.
7 8 9 |
# File 'lib/gom/storage/fetcher.rb', line 7 def initialize(id) @id = id end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/gom/storage/fetcher.rb', line 5 def id @id end |
Instance Method Details
#object ⇒ Object
11 12 13 14 15 16 |
# File 'lib/gom/storage/fetcher.rb', line 11 def object fetch_draft return nil unless has_draft? build_object @object end |