Sha256: 3f03677bf7c6035a9048a5a619ba2a5de3d6dd03d5ddf15af252fbc57d0516e0

Contents?: true

Size: 414 Bytes

Versions: 4

Compression:

Stored size: 414 Bytes

Contents

module Yoda
  module Store
    module Objects
      class SerializableSet
        include MissingDelegatable
        include Serializable

        delegate_missing :set

        # @return [Set]
        attr_reader :set

        def initialize(els = nil, elements: nil)
          @set = Set.new(els || elements)
        end

        def to_h
          { elements: set.to_a }
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
yoda-language-server-0.10.1 lib/yoda/store/objects/serializable_set.rb
yoda-language-server-0.10.0 lib/yoda/store/objects/serializable_set.rb
yoda-language-server-0.9.0 lib/yoda/store/objects/serializable_set.rb
yoda-language-server-0.8.0 lib/yoda/store/objects/serializable_set.rb