Class: RSpecDescribeHandler

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

Instance Method Summary collapse

Instance Method Details

#processObject



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/yard-rspec/handler.rb', line 4

def process
  objname = statement.parameters.first.jump(:string_content).source
  if statement.parameters[1]
    src = statement.parameters[1].jump(:string_content).source
    objname += (src[0] == "#" ? "" : "::") + src
  end
  obj = {:spec => owner ? (owner[:spec] || "") : ""}
  obj[:spec] += objname
  parse_block(statement.last.last, owner: obj)
rescue YARD::Handlers::NamespaceMissingError
end