Class: Mongoid::Orderable::Configs::GlobalConfig
- Inherits:
-
Object
- Object
- Mongoid::Orderable::Configs::GlobalConfig
- Defined in:
- lib/mongoid/orderable/configs/global_config.rb
Instance Attribute Summary collapse
-
#as ⇒ Object
Returns the value of attribute as.
-
#base ⇒ Object
Returns the value of attribute base.
-
#field ⇒ Object
Returns the value of attribute field.
-
#index ⇒ Object
Returns the value of attribute index.
-
#lock_collection ⇒ Object
Returns the value of attribute lock_collection.
-
#transaction_max_retries ⇒ Object
Returns the value of attribute transaction_max_retries.
-
#use_transactions ⇒ Object
Returns the value of attribute use_transactions.
Instance Method Summary collapse
-
#initialize ⇒ GlobalConfig
constructor
A new instance of GlobalConfig.
Constructor Details
#initialize ⇒ GlobalConfig
Returns a new instance of GlobalConfig.
15 16 17 18 19 20 21 22 |
# File 'lib/mongoid/orderable/configs/global_config.rb', line 15 def initialize self.field = :position self.index = true self.base = 1 self.use_transactions = false self.transaction_max_retries = 10 self.lock_collection = :mongoid_orderable_locks end |
Instance Attribute Details
#as ⇒ Object
Returns the value of attribute as.
7 8 9 |
# File 'lib/mongoid/orderable/configs/global_config.rb', line 7 def as @as end |
#base ⇒ Object
Returns the value of attribute base.
7 8 9 |
# File 'lib/mongoid/orderable/configs/global_config.rb', line 7 def base @base end |
#field ⇒ Object
Returns the value of attribute field.
7 8 9 |
# File 'lib/mongoid/orderable/configs/global_config.rb', line 7 def field @field end |
#index ⇒ Object
Returns the value of attribute index.
7 8 9 |
# File 'lib/mongoid/orderable/configs/global_config.rb', line 7 def index @index end |
#lock_collection ⇒ Object
Returns the value of attribute lock_collection.
7 8 9 |
# File 'lib/mongoid/orderable/configs/global_config.rb', line 7 def lock_collection @lock_collection end |
#transaction_max_retries ⇒ Object
Returns the value of attribute transaction_max_retries.
7 8 9 |
# File 'lib/mongoid/orderable/configs/global_config.rb', line 7 def transaction_max_retries @transaction_max_retries end |
#use_transactions ⇒ Object
Returns the value of attribute use_transactions.
7 8 9 |
# File 'lib/mongoid/orderable/configs/global_config.rb', line 7 def use_transactions @use_transactions end |