class RuboCop::AST::KeywordSplatNode

A node extension for `kwsplat` nodes. This will be used in place of a plain node when the builder constructs the AST, making its methods available to all `kwsplat` nodes within RuboCop.

Constants

DOUBLE_SPLAT

Public Instance Methods

colon?() click to toggle source

This is used for duck typing with `pair` nodes which also appear as `hash` elements.

@return [false]

# File lib/rubocop/ast/node/keyword_splat_node.rb, line 24
def colon?
  false
end
hash_rocket?() click to toggle source

This is used for duck typing with `pair` nodes which also appear as `hash` elements.

@return [false]

# File lib/rubocop/ast/node/keyword_splat_node.rb, line 16
def hash_rocket?
  false
end
node_parts() click to toggle source

Custom destructuring method. This is used to normalize the branches for `pair` and `kwsplat` nodes, to add duck typing to `hash` elements.

@return [Array<KeywordSplatNode>] the different parts of the `kwsplat`

# File lib/rubocop/ast/node/keyword_splat_node.rb, line 39
def node_parts
  [self, self]
end
operator() click to toggle source

Returns the operator for the `kwsplat` as a string.

@return [String] the double splat operator

# File lib/rubocop/ast/node/keyword_splat_node.rb, line 31
def operator
  DOUBLE_SPLAT
end