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-17.6.0 lib/sublime_text_kit/metadata/serializers/workspace.rb
sublime_text_kit-17.5.0 lib/sublime_text_kit/metadata/serializers/workspace.rb
sublime_text_kit-17.4.0 lib/sublime_text_kit/metadata/serializers/workspace.rb
sublime_text_kit-17.3.0 lib/sublime_text_kit/metadata/serializers/workspace.rb
sublime_text_kit-17.2.0 lib/sublime_text_kit/metadata/serializers/workspace.rb
sublime_text_kit-17.1.0 lib/sublime_text_kit/metadata/serializers/workspace.rb
sublime_text_kit-17.0.1 lib/sublime_text_kit/metadata/serializers/workspace.rb
sublime_text_kit-17.0.0 lib/sublime_text_kit/metadata/serializers/workspace.rb
sublime_text_kit-16.5.0 lib/sublime_text_kit/metadata/serializers/workspace.rb
sublime_text_kit-16.3.0 lib/sublime_text_kit/metadata/serializers/workspace.rb
sublime_text_kit-16.2.0 lib/sublime_text_kit/metadata/serializers/workspace.rb
sublime_text_kit-16.1.0 lib/sublime_text_kit/metadata/serializers/workspace.rb
sublime_text_kit-16.0.0 lib/sublime_text_kit/metadata/serializers/workspace.rb
sublime_text_kit-15.2.1 lib/sublime_text_kit/metadata/serializers/workspace.rb
sublime_text_kit-15.2.0 lib/sublime_text_kit/metadata/serializers/workspace.rb
sublime_text_kit-15.1.0 lib/sublime_text_kit/metadata/serializers/workspace.rb
sublime_text_kit-15.0.3 lib/sublime_text_kit/metadata/serializers/workspace.rb
sublime_text_kit-15.0.2 lib/sublime_text_kit/metadata/serializers/workspace.rb
sublime_text_kit-15.0.1 lib/sublime_text_kit/metadata/serializers/workspace.rb
sublime_text_kit-15.0.0 lib/sublime_text_kit/metadata/serializers/workspace.rb