class RuboCop::AST::KeywordSplatNode
A node extension for ‘kwsplat` and `forwarded_kwrestarg` nodes. This will be used in place of a plain node when the builder constructs the AST, making its methods available to all `kwsplat` and `forwarded_kwrestarg` nodes within RuboCop.
Constants
- DOUBLE_SPLAT
Public Instance Methods
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 26 def colon? false end
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 18 def hash_rocket? false end
This provides ‘forwarded_kwrestarg` node to return true to be compatible with `kwsplat` node.
@return [true]
# File lib/rubocop/ast/node/keyword_splat_node.rb, line 48 def kwsplat_type? true end
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 41 def node_parts [self, self] end
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 33 def operator DOUBLE_SPLAT end