Sha256: 10b538ebab58dc3ef5d3abae85562198ee4ccfc4af0742c316e8326d83a658cf

Contents?: true

Size: 367 Bytes

Versions: 4

Compression:

Stored size: 367 Bytes

Contents

module YARD::CodeObjects::Cucumber
  module LocationHelper

    def line_number
      files.first.last
    end

    def file
      files.first.first if files && !files.empty?
    end

    def location
      "#{file}:#{line_number}"
    end
  end

  class Base < YARD::CodeObjects::Base
    include LocationHelper

    def path
      @value || super
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
yard-gherkin-turnip-1.0.2 lib/yard/code_objects/cucumber/base.rb
yard-gherkin-turnip-1.0.1 lib/yard/code_objects/cucumber/base.rb
yard-gherkin-turnip-1.0.0 lib/yard/code_objects/cucumber/base.rb
yard-cucumber-4.0.0 lib/yard/code_objects/cucumber/base.rb