Sha256: 577dbd56b0aca32ba4a136314d3e950b12dbb21d1c9224e624d206e448efc331

Contents?: true

Size: 725 Bytes

Versions: 3

Compression:

Stored size: 725 Bytes

Contents

module Byebug
  module Helpers
    #
    # Utilities for managing gem paths
    #
    module PathHelper
      def bin_file
        @bin_file ||= File.join(root_path, 'bin', 'byebug')
      end

      def root_path
        @root_path ||= File.expand_path(File.join('..', '..', '..'), __dir__)
      end

      def lib_files
        @lib_files ||= glob_for('lib')
      end

      def test_files
        @test_files ||= glob_for('test')
      end

      def gem_files
        @gem_files ||= [bin_file] + lib_files
      end

      def all_files
        @all_files ||= gem_files + test_files
      end

      private

      def glob_for(dir)
        Dir.glob(File.join(root_path, dir, '**', '*.rb'))
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 3 rubygems

Version Path
dirwatch-0.0.2 vendor/bundle/ruby/2.3.0/gems/byebug-9.1.0/lib/byebug/helpers/path.rb
tdiary-5.0.6 vendor/bundle/gems/byebug-9.1.0/lib/byebug/helpers/path.rb
byebug-9.1.0 lib/byebug/helpers/path.rb