Class: RSpecItHandler
- Inherits:
-
YARD::Handlers::Ruby::Base
- Object
- YARD::Handlers::Ruby::Base
- RSpecItHandler
- Defined in:
- lib/yard-examples-from-rspec.rb
Overview
Handler that will set up the method <-> example map
Instance Method Summary collapse
Instance Method Details
#process ⇒ Object
20 21 22 23 24 25 |
# File 'lib/yard-examples-from-rspec.rb', line 20 def process param = statement.parameters.first.jump(:string_content).source if param =~ Regexp.union(*EXAMPLE_MATCHERS) RSpecExampleRegistry.example_map[RSpecDescribeHandler.current_path] = statement.last.last.source.gsub("\n ","\n") end end |