Class: Spree::Orders::Sort
- Inherits:
-
Object
- Object
- Spree::Orders::Sort
- Defined in:
- app/sorters/spree/orders/sort.rb
Instance Attribute Summary collapse
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
-
#sort ⇒ Object
readonly
Returns the value of attribute sort.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(scope, params) ⇒ Sort
constructor
A new instance of Sort.
Constructor Details
#initialize(scope, params) ⇒ Sort
Returns a new instance of Sort.
6 7 8 9 |
# File 'app/sorters/spree/orders/sort.rb', line 6 def initialize(scope, params) @scope = scope @sort = params[:sort] end |
Instance Attribute Details
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
4 5 6 |
# File 'app/sorters/spree/orders/sort.rb', line 4 def scope @scope end |
#sort ⇒ Object (readonly)
Returns the value of attribute sort.
4 5 6 |
# File 'app/sorters/spree/orders/sort.rb', line 4 def sort @sort end |
Instance Method Details
#call ⇒ Object
11 12 13 14 15 |
# File 'app/sorters/spree/orders/sort.rb', line 11 def call orders = completed_at(scope) orders end |