lib/pelusa/lint/indentation_level.rb in pelusa-0.0.2 vs lib/pelusa/lint/indentation_level.rb in pelusa-0.1.0
- old
+ new
@@ -27,10 +27,14 @@
if node.is_a?(Rubinius::AST::Define)
_iterate = Iterator.new do |node|
__iterate = Iterator.new do |node|
if body = get_body_from_node[node]
if node.line != [body].flatten.first.line
- @violations << body.line
+ if body.is_a?(Array)
+ @violations.merge body.map(&:line)
+ else
+ @violations << body.line
+ end
end
end
end
Array(get_body_from_node[node]).each(&__iterate)