Class: ActiveRecordExtended::QueryMethods::WithCTE::WithChain
- Inherits:
-
Object
- Object
- ActiveRecordExtended::QueryMethods::WithCTE::WithChain
- Defined in:
- lib/active_record_extended/query_methods/with_cte.rb
Instance Method Summary collapse
-
#initialize(scope) ⇒ WithChain
constructor
A new instance of WithChain.
- #recursive(args) ⇒ Object
Constructor Details
#initialize(scope) ⇒ WithChain
Returns a new instance of WithChain.
66 67 68 69 |
# File 'lib/active_record_extended/query_methods/with_cte.rb', line 66 def initialize(scope) @scope = scope @scope.cte ||= WithCTE.new(scope) end |
Instance Method Details
#recursive(args) ⇒ Object
72 73 74 75 76 77 |
# File 'lib/active_record_extended/query_methods/with_cte.rb', line 72 def recursive(args) @scope.tap do |scope| scope.recursive_value = true scope.cte.pipe_cte_with!(args) end end |