Sha256: 57033d584d6ede4d82a278b285da5c8cb47c9e24779ae7899126728e86daf475

Contents?: true

Size: 763 Bytes

Versions: 5

Compression:

Stored size: 763 Bytes

Contents

class YARD::Handlers::Ruby::StepTransformHandler < YARD::Handlers::Ruby::Base
  handles method_call(:Transform)

  process do
    instance = YARD::CodeObjects::StepTransformObject.new(step_transform_namespace,step_transformer_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

  def step_transform_namespace
    YARD::CodeObjects::Lucid::LUCID_STEPTRANSFORM_NAMESPACE
  end

  def step_transformer_name
    "step_transform#{self.class.generate_unique_id}"
  end

  def self.generate_unique_id
    @step_transformer_count = @step_transformer_count.to_i + 1
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
yard-lucid-0.5.0 lib/yard/handlers/step_transform_handler.rb
yard-lucid-0.4.0 lib/yard/handlers/step_transform_handler.rb
yard-lucid-0.3.0 lib/yard/handlers/step_transform_handler.rb
yard-lucid-0.2.0 lib/yard/handlers/step_transform_handler.rb
yard-lucid-0.1.0 lib/yard/handlers/step_transform_handler.rb