Skip to content

Commit

Permalink
Make skip a named argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Sija committed Jun 12, 2023
1 parent 204ef65 commit c35ca08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ameba/ast/visitors/node_visitor.cr
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ module Ameba::AST
end
end

def initialize(@rule, @source, skip : Category)
def initialize(@rule, @source, *, skip : Category)
initialize @rule, @source,
skip: NodeVisitor.category_to_node_classes(skip)
end

def initialize(@rule, @source, skip : Array? = nil)
def initialize(@rule, @source, *, skip : Array? = nil)
@skip = skip.try &.map(&.as(Crystal::ASTNode.class))
super @rule, @source
end
Expand Down

0 comments on commit c35ca08

Please sign in to comment.