class YARD::Handlers::Ruby::StepDefinitionHandler
Finds and processes all the step definitions defined in the ruby source
Public Class Methods
generate_unique_id()
click to toggle source
# File lib/yard/handlers/step_definition_handler.rb, line 52 def self.generate_unique_id @step_definition_count = @step_definition_count.to_i + 1 end
Public Instance Methods
pending_command_statement?(line)
click to toggle source
# File lib/yard/handlers/step_definition_handler.rb, line 35 def pending_command_statement?(line) (line.type == :command || line.type == :vcall) && line.first.source == pending_keyword end
pending_keyword()
click to toggle source
# File lib/yard/handlers/step_definition_handler.rb, line 31 def pending_keyword "skip" end
pending_keyword_used?(block)
click to toggle source
# File lib/yard/handlers/step_definition_handler.rb, line 39 def pending_keyword_used?(block) code_in_block = block.last code_in_block.find { |line| pending_command_statement?(line) } end
step_definition_name()
click to toggle source
# File lib/yard/handlers/step_definition_handler.rb, line 48 def step_definition_name "step_definition#{self.class.generate_unique_id}" end
step_transform_namespace()
click to toggle source
# File lib/yard/handlers/step_definition_handler.rb, line 44 def step_transform_namespace YARD::CodeObjects::Cucumber::CUCUMBER_STEPTRANSFORM_NAMESPACE end