Class: ActiveRecordExtended::QueryMethods::WithCTE::WithChain

Inherits:
Object
  • Object
show all
Defined in:
lib/active_record_extended/query_methods/with_cte.rb

Instance Method Summary collapse

Constructor Details

#initialize(scope) ⇒ WithChain



7
8
9
# File 'lib/active_record_extended/query_methods/with_cte.rb', line 7

def initialize(scope)
  @scope = scope
end

Instance Method Details

#recursive(*args) ⇒ Object



11
12
13
14
15
16
# File 'lib/active_record_extended/query_methods/with_cte.rb', line 11

def recursive(*args)
  @scope.tap do |scope|
    scope.with_values    += args
    scope.recursive_value = true
  end
end