This code
class C
def f
raise "unexpected" unless array.all?{ |e|
next (
# method1 should be gtrater than 0
method1>0 ||
(
# or it shoule be 0 and
method1==0 &&
(
(
# methos2 should be satisfied
some_method2
)||
(
#or method3
some_method3
)
)
)
)
}
end
end
gets formatted to this code
class C
def f
raise "unexpected" unless array.all? { |e|
next (
# method1 should be gtrater than 0
method1 > 0 ||
(
# or it shoule be 0 and
method1 == 0 &&
((
# methos2 should be satisfied
some_method2) ||
(
#or method3
some_method3))))
}
end
end
Is this the expected behavior for rufo?
I personally wanted the comments to be on the same identation with the code.
I checked with the latest rufo.
https://github.com/ruby-formatter/rufo/tree/5186ef60d6b34fde3da5f66699ce625620c41090
This code
gets formatted to this code
Is this the expected behavior for rufo?
I personally wanted the comments to be on the same identation with the code.
I checked with the latest rufo.
https://github.com/ruby-formatter/rufo/tree/5186ef60d6b34fde3da5f66699ce625620c41090