Method: Transpec::Syntax::Mixin::Metadata#metadata_nodes
- Defined in:
- lib/transpec/syntax/mixin/metadata.rb
#metadata_nodes ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/transpec/syntax/mixin/metadata.rb', line 13 def return arg_nodes if arg_nodes.empty? # The first argument must be always description. non_description_arg_nodes = arg_nodes.drop(1) non_description_arg_nodes.drop_while do |node| # Possibly there still may be descriptions after the first arg. # describe 'something', '#some_method', :foo, bar: true { } ![:hash, :sym].include?(node.type) end end |