Class: ActsAsRecursiveTree::Options::QueryOptions
- Inherits:
-
Object
- Object
- ActsAsRecursiveTree::Options::QueryOptions
- Defined in:
- lib/acts_as_recursive_tree/options/query_options.rb
Constant Summary collapse
- STRATEGIES =
%i[subselect, join].freeze
Instance Attribute Summary collapse
-
#condition ⇒ Object
Returns the value of attribute condition.
-
#ensure_ordering ⇒ Object
readonly
Returns the value of attribute ensure_ordering.
-
#query_strategy ⇒ Object
Returns the value of attribute query_strategy.
Instance Method Summary collapse
Instance Attribute Details
#condition ⇒ Object
Returns the value of attribute condition.
7 8 9 |
# File 'lib/acts_as_recursive_tree/options/query_options.rb', line 7 def condition @condition end |
#ensure_ordering ⇒ Object (readonly)
Returns the value of attribute ensure_ordering.
8 9 10 |
# File 'lib/acts_as_recursive_tree/options/query_options.rb', line 8 def ensure_ordering @ensure_ordering end |
#query_strategy ⇒ Object
Returns the value of attribute query_strategy.
8 9 10 |
# File 'lib/acts_as_recursive_tree/options/query_options.rb', line 8 def query_strategy @query_strategy end |
Instance Method Details
#depth ⇒ Object
10 11 12 |
# File 'lib/acts_as_recursive_tree/options/query_options.rb', line 10 def depth @depth ||= DepthCondition.new end |
#depth_present? ⇒ Boolean
18 19 20 |
# File 'lib/acts_as_recursive_tree/options/query_options.rb', line 18 def depth_present? @depth.present? end |
#ensure_ordering! ⇒ Object
14 15 16 |
# File 'lib/acts_as_recursive_tree/options/query_options.rb', line 14 def ensure_ordering! @ensure_ordering = true end |