class RubbyCop::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 RubbyCop.

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/rubbycop/ast/node/keyword_splat_node.rb, line 25
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/rubbycop/ast/node/keyword_splat_node.rb, line 17
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/rubbycop/ast/node/keyword_splat_node.rb, line 40
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/rubbycop/ast/node/keyword_splat_node.rb, line 32
def operator
  DOUBLE_SPLAT
end