Sha256: 2ef7cdfc3d62a2375f6d093d1a3558b84d81a3b04ad26b894a842269af62d948

Contents?: true

Size: 499 Bytes

Versions: 13

Compression:

Stored size: 499 Bytes

Contents

# frozen_string_literal: true

module SublimeTextKit
  module Metadata
    # Defines metadata pathways.
    Pathway = Struct.new :project_dir, :metadata_dir, keyword_init: true do
      using Refinements::Pathname

      def initialize *arguments
        super
        each_pair { |key, value| self[key] = Pathname(value).expand_path }
      end

      def project_name = project_dir.basename

      def metadata_file(extension) = metadata_dir.join("#{project_name}.#{extension}")
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
sublime_text_kit-17.6.0 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-17.5.0 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-17.4.0 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-17.3.0 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-17.2.0 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-17.1.0 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-17.0.1 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-17.0.0 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-16.5.0 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-16.3.0 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-16.2.0 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-16.1.0 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-16.0.0 lib/sublime_text_kit/metadata/pathway.rb