Method: Fast.last_position_from_expression
- Defined in:
- lib/fast/cli.rb
.last_position_from_expression(node) ⇒ Object
If a method call contains a heredoc, it should print the STR around it too.
44 45 46 47 |
# File 'lib/fast/cli.rb', line 44 def last_position_from_expression(node) internal_heredoc = node.each_descendant(:str).select { |n| n.loc.respond_to?(:heredoc_end) } internal_heredoc.map { |n| n.loc.heredoc_end.end_pos }.max if internal_heredoc.any? end |