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)


1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
# File 'lib/syntax_tree.rb', line 1782

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