module Restforce::DB::Model::ClassMethods

Public Instance Methods

sync_with(salesforce_model, strategy = :always, options = {}, &block) click to toggle source

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.

# File lib/restforce/db/model.rb, line 28
def sync_with(salesforce_model, strategy = :always, options = {}, &block)
  Restforce::DB::DSL.new(self, salesforce_model, strategy, options).instance_eval(&block)
end