Sha256: 1f63f4abb8d971f0660037a870c3d21dde0973c798c5f4f1a13178144aafdd49

Contents?: true

Size: 500 Bytes

Versions: 30

Compression:

Stored size: 500 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::Pathnames

      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

30 entries across 30 versions & 1 rubygems

Version Path
sublime_text_kit-15.2.1 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-15.2.0 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-15.1.0 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-15.0.3 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-15.0.2 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-15.0.1 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-15.0.0 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-14.2.0 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-14.1.2 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-14.1.1 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-14.1.0 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-14.0.0 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-13.5.0 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-13.4.0 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-13.3.0 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-13.2.0 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-13.1.0 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-13.0.1 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-13.0.0 lib/sublime_text_kit/metadata/pathway.rb
sublime_text_kit-12.3.2 lib/sublime_text_kit/metadata/pathway.rb