Module: Restforce::DB::Model::ClassMethods
- Defined in:
- lib/restforce/db/model.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#sync_with(salesforce_model, strategy = :always, options = {}, &block) ⇒ Object
Public: Initializes a Restforce::DB::Mapping defining this model’s relationship to a Salesforce object type.
Instance Method Details
#sync_with(salesforce_model, strategy = :always, options = {}, &block) ⇒ Object
Public: Initializes a Restforce::DB::Mapping defining this model’s relationship to a Salesforce object type. Passes a provided block to the Restforce::DB::DSL for evaluation.
salesforce_model - A String name of an object type in Salesforce. strategy - A Symbol naming a desired initialization strategy. options - A Hash of options to pass through to the Mapping. block - A block of code to evaluate through the DSL.
Returns nothing.
28 29 30 |
# File 'lib/restforce/db/model.rb', line 28 def sync_with(salesforce_model, strategy = :always, = {}, &block) Restforce::DB::DSL.new(self, salesforce_model, strategy, ).instance_eval(&block) end |