Sha256: 16fba002b69d0d164166f8477987807cc56f053a5ea87df1e41e0cde5b084d73

Contents?: true

Size: 580 Bytes

Versions: 43

Compression:

Stored size: 580 Bytes

Contents

# frozen_string_literal: true

module SublimeTextKit
  module Metadata
    module Serializers
      # Serializes workspace metadata.
      class Workspace
        attr_reader :pathway

        def initialize pathway
          @pathway = pathway
        end

        def to_h
          {
            expanded_folders: [pathway.project_dir.to_s],
            select_project: {
              selected_items: [
                [pathway.project_name.to_s, pathway.metadata_file("sublime-project").to_s]
              ]
            }
          }
        end
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
sublime_text_kit-11.0.2 lib/sublime_text_kit/metadata/serializers/workspace.rb
sublime_text_kit-11.0.1 lib/sublime_text_kit/metadata/serializers/workspace.rb
sublime_text_kit-11.0.0 lib/sublime_text_kit/metadata/serializers/workspace.rb