Sha256: 58fde7ade111d3153b8910e706a8882a9122b731d1d04342fce1bae033b3b6c6

Contents?: true

Size: 638 Bytes

Versions: 8

Compression:

Stored size: 638 Bytes

Contents

class YARD::Handlers::Ruby::StepDefinitionHandler < YARD::Handlers::Ruby::Base
  handles method_call(:When),method_call(:Given),method_call(:And),method_call(:Then)
  
  @@unique_name = 0
  
  process do
    @@unique_name += 1

    instance = YARD::CodeObjects::StepDefinitionObject.new(YARD::CodeObjects::Cucumber::CUCUMBER_STEPTRANSFORM_NAMESPACE,"step_definition#{@@unique_name}") do |o| 
      o.source = statement.source
      o.comments = statement.comments
      o.keyword = statement[0].source
      o.value = statement[1].source
    end

    obj = register instance
    parse_block(statement[2],:owner => obj)
    
  end
  
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
yard-cucumber-2.0.3 lib/yard/handlers/step_definition_handler.rb
yard-cucumber-2.0.2 lib/yard/handlers/step_definition_handler.rb
yard-cucumber-2.0.1 lib/yard/handlers/step_definition_handler.rb
yard-cucumber-2.0.0 lib/yard/handlers/step_definition_handler.rb
cucumber-in-the-yard-1.7.8 lib/yard/handlers/step_definition_handler.rb
cucumber-in-the-yard-1.7.7 lib/yard/handlers/step_definition_handler.rb
cucumber-in-the-yard-1.7.6 lib/yard/handlers/step_definition_handler.rb
cucumber-in-the-yard-1.7.5 lib/yard/handlers/step_definition_handler.rb