Class: RSpecItHandler

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

Instance Method Summary collapse

Instance Method Details

#processObject



20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/yard-rspec/handler.rb', line 20

def process
  return if owner.nil?
  obj = P(owner[:spec])
  return if obj.is_a?(Proxy)
  
  (obj[:specifications] ||= []) << {
    name: statement.parameters.first.jump(:string_content).source,
    file: statement.file,
    line: statement.line,
    source: statement.last.last.source.chomp
  }
end