Module: SyntaxTree::AssignFormatting

Defined in:
lib/syntax_tree.rb

Overview

Determins if the following value should be indented or not.

Class Method Summary collapse

Class Method Details

.skip_indent?(value) ⇒ Boolean

Returns:

  • (Boolean)


1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
# File 'lib/syntax_tree.rb', line 1760

def self.skip_indent?(value)
  (value.is_a?(Call) && skip_indent?(value.receiver)) ||
    [
      ArrayLiteral,
      HashLiteral,
      Heredoc,
      Lambda,
      QSymbols,
      QWords,
      Symbols,
      Words
    ].include?(value.class)
end