Class: Serializer::Sort
- Inherits:
-
Upframework::BaseService
- Object
- Upframework::BaseService
- Serializer::Sort
- Defined in:
- app/lib/serializer/sort.rb
Instance Attribute Summary collapse
-
#records ⇒ Object
Returns the value of attribute records.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(records: [], sort: nil, **params) ⇒ Sort
constructor
A new instance of Sort.
- #result ⇒ Object
- #sort_scope ⇒ Object
Constructor Details
#initialize(records: [], sort: nil, **params) ⇒ Sort
Returns a new instance of Sort.
4 5 6 7 |
# File 'app/lib/serializer/sort.rb', line 4 def initialize(records: [], sort: nil, **params) @records = records @sort = sort end |
Instance Attribute Details
#records ⇒ Object
Returns the value of attribute records.
2 3 4 |
# File 'app/lib/serializer/sort.rb', line 2 def records @records end |
Instance Method Details
#execute ⇒ Object
9 10 11 |
# File 'app/lib/serializer/sort.rb', line 9 def execute sort_scope end |
#result ⇒ Object
13 14 15 |
# File 'app/lib/serializer/sort.rb', line 13 def result records end |
#sort_scope ⇒ Object
17 18 19 |
# File 'app/lib/serializer/sort.rb', line 17 def sort_scope #TODO sort scope here end |