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.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#condition ⇒ Object
Returns the value of attribute condition.
14 15 16 |
# File 'lib/acts_as_recursive_tree/options/query_options.rb', line 14 def condition @condition end |
#ensure_ordering ⇒ Object (readonly)
Returns the value of attribute ensure_ordering.
15 16 17 |
# File 'lib/acts_as_recursive_tree/options/query_options.rb', line 15 def ensure_ordering @ensure_ordering end |
#query_strategy ⇒ Object
Returns the value of attribute query_strategy.
15 16 17 |
# File 'lib/acts_as_recursive_tree/options/query_options.rb', line 15 def query_strategy @query_strategy end |
Class Method Details
.from {|options| ... } ⇒ Object
8 9 10 11 12 |
# File 'lib/acts_as_recursive_tree/options/query_options.rb', line 8 def self.from = new yield() if block_given? end |
Instance Method Details
#depth ⇒ Object
17 18 19 |
# File 'lib/acts_as_recursive_tree/options/query_options.rb', line 17 def depth @depth ||= DepthCondition.new end |
#depth_present? ⇒ Boolean
25 26 27 |
# File 'lib/acts_as_recursive_tree/options/query_options.rb', line 25 def depth_present? @depth.present? end |
#ensure_ordering! ⇒ Object
21 22 23 |
# File 'lib/acts_as_recursive_tree/options/query_options.rb', line 21 def ensure_ordering! @ensure_ordering = true end |