class YARD::Handlers::Ruby::StepTransformHandler

Public Class Methods

generate_unique_id() click to toggle source
# File lib/yard/handlers/step_transform_handler.rb, line 40
def self.generate_unique_id
  @step_transformer_count = @step_transformer_count.to_i + 1
end

Public Instance Methods

step_transform_namespace() click to toggle source
# File lib/yard/handlers/step_transform_handler.rb, line 27
def step_transform_namespace
  YARD::CodeObjects::Cucumber::CUCUMBER_STEPTRANSFORM_NAMESPACE
end
step_transformer_name() click to toggle source
# File lib/yard/handlers/step_transform_handler.rb, line 31
def step_transformer_name
  # If the owner is a constant then we get the name of the constant so that the reference from the constant will work
  if (owner.is_a?(YARD::CodeObjects::ConstantObject))
    owner.name
  else
    "step_transform#{self.class.generate_unique_id}"
  end
end

Private Instance Methods

find(node, node_type, value) click to toggle source
# File lib/yard/handlers/step_transform_handler.rb, line 46
def find(node, node_type, value)
  node.traverse { |child| return(child) if node_type == child.type && child.source == value }
  self
end