Class: Troo::Retrieval::Remote
- Inherits:
-
Object
- Object
- Troo::Retrieval::Remote
- Defined in:
- lib/troo/retrieval/remote.rb
Instance Attribute Summary collapse
-
#external_id ⇒ Object
readonly
Returns the value of attribute external_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#fetch ⇒ Object
[].
-
#initialize(klass, external_id, options = {}) ⇒ Object
constructor
[].
Constructor Details
#initialize(klass, external_id, options = {}) ⇒ Object
Returns [].
20 21 22 23 24 |
# File 'lib/troo/retrieval/remote.rb', line 20 def initialize(klass, external_id, = {}) @klass = klass @external_id = external_id @options = end |
Instance Attribute Details
#external_id ⇒ Object (readonly)
Returns the value of attribute external_id.
4 5 6 |
# File 'lib/troo/retrieval/remote.rb', line 4 def external_id @external_id end |
Class Method Details
.fetch(klass, external_id, options = {}) ⇒ Object
Returns [].
11 12 13 |
# File 'lib/troo/retrieval/remote.rb', line 11 def fetch(klass, external_id, = {}) new(klass, external_id, ).fetch end |
Instance Method Details
#fetch ⇒ Object
Returns [].
27 28 29 30 31 |
# File 'lib/troo/retrieval/remote.rb', line 27 def fetch return [] if none? return persist if persist? resources end |