Sha256: 20e0f84e75c81f09dc5dcfa7df7355b9f92c43182e07cdd64c6169fe3712ca56

Contents?: true

Size: 363 Bytes

Versions: 5

Compression:

Stored size: 363 Bytes

Contents

module YARD::CodeObjects::Lucid
  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

5 entries across 5 versions & 1 rubygems

Version Path
yard-lucid-0.5.0 lib/yard/code_objects/lucid/base.rb
yard-lucid-0.4.0 lib/yard/code_objects/lucid/base.rb
yard-lucid-0.3.0 lib/yard/code_objects/lucid/base.rb
yard-lucid-0.2.0 lib/yard/code_objects/lucid/base.rb
yard-lucid-0.1.0 lib/yard/code_objects/lucid/base.rb