Class: ChaoticOrder::Manager
- Inherits:
-
Object
- Object
- ChaoticOrder::Manager
- Defined in:
- lib/chaotic_order/manager.rb
Instance Attribute Summary collapse
-
#adapter_name ⇒ Object
readonly
Returns the value of attribute adapter_name.
-
#arel ⇒ Object
readonly
Returns the value of attribute arel.
Instance Method Summary collapse
-
#initialize(arel, adapter_name) ⇒ Manager
constructor
A new instance of Manager.
- #set_random_order ⇒ Object
Constructor Details
#initialize(arel, adapter_name) ⇒ Manager
Returns a new instance of Manager.
7 8 9 10 |
# File 'lib/chaotic_order/manager.rb', line 7 def initialize(arel, adapter_name) @arel = arel @adapter_name = adapter_name end |
Instance Attribute Details
#adapter_name ⇒ Object (readonly)
Returns the value of attribute adapter_name.
5 6 7 |
# File 'lib/chaotic_order/manager.rb', line 5 def adapter_name @adapter_name end |
#arel ⇒ Object (readonly)
Returns the value of attribute arel.
5 6 7 |
# File 'lib/chaotic_order/manager.rb', line 5 def arel @arel end |
Instance Method Details
#set_random_order ⇒ Object
12 13 14 15 16 |
# File 'lib/chaotic_order/manager.rb', line 12 def set_random_order return unless set_random_order? arel.order(random_for_adapter) end |