Sha256: 8698df4462b8cbb2a05922f95879371fa046e6ad37ceb354a79734b523b5b1bc
Contents?: true
Size: 794 Bytes
Versions: 13
Compression:
Stored size: 794 Bytes
Contents
class YARD::Handlers::Ruby::Legacy::StepTransformHandler < YARD::Handlers::Ruby::Legacy::Base STEP_TRANSFORM_MATCH = /^(Transform\s*(\/.+\/)\s+do(?:\s*\|.+\|)?\s*)$/ unless defined?(STEP_TRANSFORM_MATCH) handles STEP_TRANSFORM_MATCH @@unique_name = 0 def process transform = statement.tokens.to_s[STEP_TRANSFORM_MATCH,2] @@unique_name = @@unique_name + 1 instance = StepTransformObject.new(YARD::CodeObjects::Cucumber::CUCUMBER_STEPTRANSFORM_NAMESPACE, "transform_#{@@unique_name}") do |o| o.source = "Transform #{transform} do #{statement.block.to_s}\nend" o.value = transform o.keyword = "Transform" end obj = register instance parse_block :owner => obj rescue YARD::Handlers::NamespaceMissingError end end
Version data entries
13 entries across 13 versions & 3 rubygems