class Restforce::DB::Strategy

Restforce::DB::Strategy is an abstraction for the available synchronization strategies, and provides a factory method by which to obtain a strategy by name.

Public Class Methods

for(name, options = {}) click to toggle source

Public: Get a Strategy by the requested name.

name - The Symbol or String name of the desired strategy. options - A Hash of options to pass to the strategy’s initializer.

Returns a Restforce::DB::Strategies instance.

# File lib/restforce/db/strategy.rb, line 16
def self.for(name, options = {})
  class_name = "Restforce::DB::Strategies::#{name.to_s.camelize}"
  class_name.constantize.new(options)
end