module RuboCop::Cop::RSpec::Metadata
Helper methods to find RSpec
metadata.
Public Instance Methods
Source
# File lib/rubocop/cop/rspec/mixin/metadata.rb, line 30 def on_block(node) rspec_configure(node) do |block_var| metadata_in_block(node, block_var) do |metadata_arguments| on_metadata_arguments(metadata_arguments) end end rspec_metadata(node) do |metadata_arguments| on_metadata_arguments(metadata_arguments) end end
Also aliased as: on_numblock
Source
# File lib/rubocop/cop/rspec/mixin/metadata.rb, line 43 def on_metadata(_symbols, _hash) raise ::NotImplementedError end
Private Instance Methods
Source
# File lib/rubocop/cop/rspec/mixin/metadata.rb, line 49 def on_metadata_arguments(metadata_arguments) if metadata_arguments.last&.hash_type? *metadata_arguments, hash = metadata_arguments on_metadata(metadata_arguments, hash) else on_metadata(metadata_arguments, nil) end end