Sha256: 7611c4fff42b2cc4b4acd7f73c159016e96b25d9431bbdc9f5bca1ef0489cc72

Contents?: true

Size: 452 Bytes

Versions: 4

Compression:

Stored size: 452 Bytes

Contents

# frozen_string_literal: true

require "refinements/pathnames"

module SublimeTextKit
  module Configuration
    # Models the configuration.
    Model = Struct.new :project_roots, :metadata_dir, :snippets_format, :session_path, :user_dir do
      using Refinements::Pathnames

      def project_dirs
        Array(project_roots).map { |path| Pathname(path).expand_path }
                            .flat_map(&:directories)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sublime_text_kit-15.2.1 lib/sublime_text_kit/configuration/model.rb
sublime_text_kit-15.2.0 lib/sublime_text_kit/configuration/model.rb
sublime_text_kit-15.1.0 lib/sublime_text_kit/configuration/model.rb
sublime_text_kit-15.0.3 lib/sublime_text_kit/configuration/model.rb