Skip to content

Commit f9cbff0

Browse files
authored
feat: use new concern syntax (#431)
1 parent 194de58 commit f9cbff0

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

lib/closure_tree/digraphs.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def to_digraph_label
1111
_ct.has_name? ? read_attribute(_ct.name_column) : to_s
1212
end
1313

14-
module ClassMethods
14+
class_methods do
1515
# Renders the given scope as a DOT digraph, suitable for rendering by Graphviz
1616
def to_dot_digraph(tree_scope)
1717
id_to_instance = tree_scope.reduce({}) { |h, ea| h[ea.id] = ea; h }

lib/closure_tree/finders.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def without_self(scope)
5050
scope.without_instance(self)
5151
end
5252

53-
module ClassMethods
53+
class_methods do
5454

5555
def without_instance(instance)
5656
if instance.new_record?

lib/closure_tree/hash_tree.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def hash_tree(options = {})
66
_ct.hash_tree(self_and_descendants, options[:limit_depth])
77
end
88

9-
module ClassMethods
9+
class_methods do
1010

1111
# There is no default depth limit. This might be crazy-big, depending
1212
# on your tree shape. Hash huge trees at your own peril!

lib/closure_tree/hierarchy_maintenance.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def delete_hierarchy_references
104104
end
105105
end
106106

107-
module ClassMethods
107+
class_methods do
108108
# Rebuilds the hierarchy table based on the parent_id column in the database.
109109
# Note that the hierarchy table will be truncated.
110110
def rebuild!

lib/closure_tree/numeric_deterministic_ordering.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def self_and_descendants_preordered
4242
.reorder(self.class._ct_sum_order_by(self))
4343
end
4444

45-
module ClassMethods
45+
class_methods do
4646

4747
# If node is nil, order the whole tree.
4848
def _ct_sum_order_by(node = nil)

0 commit comments

Comments
 (0)