Class: Yaqb::QueryBuilders::QueryOrchestrator

Inherits:
Object
  • Object
show all
Defined in:
lib/yaqb/query_builders/query_orchestrator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scope, params, request, response, presenter) ⇒ QueryOrchestrator

Returns a new instance of QueryOrchestrator.



12
13
14
15
16
17
18
# File 'lib/yaqb/query_builders/query_orchestrator.rb', line 12

def initialize(scope, params, request, response, presenter)
  @scope = scope
  @params = params
  @request = request
  @response = response
  @presenter = presenter
end

Instance Attribute Details

Returns the value of attribute links.



10
11
12
# File 'lib/yaqb/query_builders/query_orchestrator.rb', line 10

def links
  @links
end

#scopeObject (readonly)

Returns the value of attribute scope.



10
11
12
# File 'lib/yaqb/query_builders/query_orchestrator.rb', line 10

def scope
  @scope
end

Instance Method Details

#callObject



20
21
22
23
24
25
26
# File 'lib/yaqb/query_builders/query_orchestrator.rb', line 20

def call
  @scope = filter
  @scope = sort
  @scope = paginate

  self
end