Class: Restforce::DB::Strategies::Always
- Inherits:
-
Object
- Object
- Restforce::DB::Strategies::Always
- Defined in:
- lib/restforce/db/strategies/always.rb
Overview
Restforce::DB::Strategies::Always defines an initialization strategy for a mapping in which newly-discovered records should always be synchronized from Salesforce into the database, and vice-versa.
Instance Method Summary collapse
-
#build?(record) ⇒ Boolean
Public: Should the passed record be constructed in the other system?.
-
#initialize(**_) ⇒ Always
constructor
Public: Initialize a Restforce::DB::Strategies::Always.
-
#passive? ⇒ Boolean
Public: Is this a passive sync strategy?.
Constructor Details
#initialize(**_) ⇒ Always
Public: Initialize a Restforce::DB::Strategies::Always.
13 14 |
# File 'lib/restforce/db/strategies/always.rb', line 13 def initialize(**_) end |
Instance Method Details
#build?(record) ⇒ Boolean
Public: Should the passed record be constructed in the other system?
record - A Restforce::DB::Instances::Base.
Returns a Boolean.
21 22 23 |
# File 'lib/restforce/db/strategies/always.rb', line 21 def build?(record) !record.synced? end |
#passive? ⇒ Boolean
Public: Is this a passive sync strategy?
Returns false.
28 29 30 |
# File 'lib/restforce/db/strategies/always.rb', line 28 def passive? false end |