Module: Sequel::Plugins::Tree::ClassMethods

Defined in:
lib/sequel/plugins/tree.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#children_association_nameObject (readonly)

The association name for the children association


70
71
72
# File 'lib/sequel/plugins/tree.rb', line 70

def children_association_name
  @children_association_name
end

#parent_association_nameObject (readonly)

The association name for the parent association


67
68
69
# File 'lib/sequel/plugins/tree.rb', line 67

def parent_association_name
  @parent_association_name
end

#parent_columnObject

The symbol for the column containing the value pointing to the parent of the leaf.


64
65
66
# File 'lib/sequel/plugins/tree.rb', line 64

def parent_column
  @parent_column
end

#tree_orderObject

The column symbol or array of column symbols on which to order the tree.


60
61
62
# File 'lib/sequel/plugins/tree.rb', line 60

def tree_order
  @tree_order
end

Instance Method Details

#freezeObject

Should freeze tree order if it is an array when freezing the model class.


76
77
78
79
80
# File 'lib/sequel/plugins/tree.rb', line 76

def freeze
  @tree_order.freeze if @tree_order.is_a?(Array)

  super
end