Class: Mongoid::Orderable::Configs::GlobalConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/mongoid/orderable/configs/global_config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeGlobalConfig

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

#asObject

Returns the value of attribute as.



7
8
9
# File 'lib/mongoid/orderable/configs/global_config.rb', line 7

def as
  @as
end

#baseObject

Returns the value of attribute base.



7
8
9
# File 'lib/mongoid/orderable/configs/global_config.rb', line 7

def base
  @base
end

#fieldObject

Returns the value of attribute field.



7
8
9
# File 'lib/mongoid/orderable/configs/global_config.rb', line 7

def field
  @field
end

#indexObject

Returns the value of attribute index.



7
8
9
# File 'lib/mongoid/orderable/configs/global_config.rb', line 7

def index
  @index
end

#lock_collectionObject

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_retriesObject

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_transactionsObject

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