Module: GlobalUid
- Defined in:
- lib/global_uid.rb,
lib/global_uid/base.rb,
lib/global_uid/server.rb,
lib/global_uid/allocator.rb,
lib/global_uid/test_support.rb,
lib/global_uid/configuration.rb,
lib/global_uid/error_tracker.rb,
lib/global_uid/migration_extension.rb,
lib/global_uid/active_record_extension.rb,
lib/global_uid/schema_dumper_extension.rb,
lib/global_uid/has_and_belongs_to_many_builder_extension.rb
Defined Under Namespace
Modules: ActiveRecordExtension, HasAndBelongsToManyBuilderExtension, MigrationExtension, SchemaDumperExtension, TestSupport
Classes: Allocator, Base, Configuration, ConnectionTimeoutException, ErrorTracker, InvalidIncrementException, NoServersAvailableException, Server, TimeoutException
Class Method Summary
collapse
Class Method Details
22
23
24
|
# File 'lib/global_uid.rb', line 22
def self.configure
yield configuration if block_given?
end
|
.disable! ⇒ Object
26
27
28
|
# File 'lib/global_uid.rb', line 26
def self.disable!
self.configuration.disabled = true
end
|
.disabled? ⇒ Boolean
38
39
40
|
# File 'lib/global_uid.rb', line 38
def self.disabled?
self.configuration.disabled
end
|
.enable! ⇒ Object
30
31
32
|
# File 'lib/global_uid.rb', line 30
def self.enable!
self.configuration.disabled = false
end
|
.enabled? ⇒ Boolean
34
35
36
|
# File 'lib/global_uid.rb', line 34
def self.enabled?
!self.disabled?
end
|
.reset_configuration ⇒ Object
43
44
45
|
# File 'lib/global_uid.rb', line 43
def self.reset_configuration
@configuration = nil
end
|