Class: LegacyRSpecDescribeHandler

Inherits:
YARD::Handlers::Ruby::Legacy::Base
  • Object
show all
Defined in:
lib/yard-rspec/legacy.rb

Constant Summary collapse

MATCH =
/\Adescribe\s+(.+?)\s+(do|\{)/

Instance Method Summary collapse

Instance Method Details

#processObject



5
6
7
8
9
10
11
# File 'lib/yard-rspec/legacy.rb', line 5

def process
  objname = statement.tokens.to_s[MATCH, 1].gsub(/["']/, '')
  obj = {:spec => owner ? (owner[:spec] || "") : ""}
  obj[:spec] += objname
  parse_block :owner => obj
rescue YARD::Handlers::NamespaceMissingError
end