Module: Restforce::DB
- Defined in:
- lib/restforce/db.rb,
lib/restforce/db/dsl.rb,
lib/restforce/db/model.rb,
lib/restforce/db/runner.rb,
lib/restforce/db/worker.rb,
lib/restforce/db/command.rb,
lib/restforce/db/mapping.rb,
lib/restforce/db/tracker.rb,
lib/restforce/db/version.rb,
lib/restforce/db/registry.rb,
lib/restforce/db/strategy.rb,
lib/restforce/db/collector.rb,
lib/restforce/db/accumulator.rb,
lib/restforce/db/initializer.rb,
lib/restforce/db/synchronizer.rb,
lib/restforce/db/attribute_map.rb,
lib/restforce/db/configuration.rb,
lib/restforce/db/instances/base.rb,
lib/restforce/db/associations/base.rb,
lib/restforce/db/record_types/base.rb,
lib/restforce/db/strategies/always.rb,
lib/restforce/db/strategies/passive.rb,
lib/restforce/db/associations/has_one.rb,
lib/restforce/db/instances/salesforce.rb,
lib/restforce/db/associations/has_many.rb,
lib/restforce/db/strategies/associated.rb,
lib/restforce/db/associations/belongs_to.rb,
lib/restforce/db/instances/active_record.rb,
lib/restforce/db/record_types/salesforce.rb,
lib/restforce/db/associations/foreign_key.rb,
lib/restforce/db/record_types/active_record.rb
Overview
:nodoc:
Defined Under Namespace
Modules: Associations, Instances, Model, RecordTypes, Strategies Classes: Accumulator, AttributeMap, Collector, Command, Configuration, DSL, Initializer, Mapping, Registry, Runner, Strategy, Synchronizer, Tracker, Worker
Constant Summary collapse
- VERSION =
"1.2.2"
Class Attribute Summary collapse
-
.configuration ⇒ Object
Public: Get the current configuration for Restforce::DB.
-
.last_run ⇒ Object
Returns the value of attribute last_run.
Class Method Summary collapse
-
.client ⇒ Object
Public: Get a Restforce client based on the currently configured settings.
-
.configure {|configuration| ... } ⇒ Object
Public: Configure Restforce::DB by assigning values to the current configuration.
-
.reset ⇒ Object
Public: Eliminate all customizations to the current Restforce::DB configuration and client.
Class Attribute Details
.configuration ⇒ Object
Public: Get the current configuration for Restforce::DB.
Returns a Restforce::DB::Configuration instance.
58 59 60 |
# File 'lib/restforce/db.rb', line 58 def self.configuration @configuration ||= Configuration.new end |
.last_run ⇒ Object
Returns the value of attribute last_run.
50 51 52 |
# File 'lib/restforce/db.rb', line 50 def last_run @last_run end |
Class Method Details
.client ⇒ Object
Public: Get a Restforce client based on the currently configured settings.
Returns a Restforce::Data::Client instance.
65 66 67 68 69 70 71 72 73 74 |
# File 'lib/restforce/db.rb', line 65 def self.client @client ||= Restforce.new( username: configuration.username, password: configuration.password, security_token: configuration.security_token, client_id: configuration.client_id, client_secret: configuration.client_secret, host: configuration.host, ) end |
.configure {|configuration| ... } ⇒ Object
Public: Configure Restforce::DB by assigning values to the current configuration.
Yields the current configuration. Returns the current configuration.
81 82 83 84 |
# File 'lib/restforce/db.rb', line 81 def self.configure yield(configuration) configuration end |
.reset ⇒ Object
Public: Eliminate all customizations to the current Restforce::DB configuration and client.
Returns nothing.
90 91 92 93 |
# File 'lib/restforce/db.rb', line 90 def self.reset @configuration = nil @client = nil end |