Hi, just wondering if/how we could get support for the alternative style of method chaining i.e. 'leading dots' - see Option A in the Ruby Style Guide
This project supports trailing dots (Option B) quite well (i.e. . on preceding lines). However if you are using the leading dot notation, it doesnt recognize the block and removes any indentation you might have
User.where(status: ...).
- .order('updated_at DESC')
+ .order('updated_at DESC')
The spec could look like this;
- name: should indent alternative style multiline method call chains
input: |
def method_with_multiline_method_call_chain
multiline_method_call
.foo
.bar
another_method_call
end
output: |
def method_with_multiline_method_call_chain
multiline_method_call
.foo
.bar
another_method_call
end
Hi, just wondering if/how we could get support for the alternative style of method chaining i.e. 'leading dots' - see Option A in the Ruby Style Guide
This project supports trailing dots (Option B) quite well (i.e.
.on preceding lines). However if you are using the leading dot notation, it doesnt recognize the block and removes any indentation you might haveThe spec could look like this;