class RSpec::Core::Set

Experimental RBS support (using type sampling data from the type_fusion project).

# sig/rspec/core/set.rbs

class RSpec::Core::Set
  def <<: (RSpec::Core::Profiler key) -> RSpec::Core::Set
  def each: () -> RSpec::Core::Set
  def initialize: (?Array[] array) -> void
  def merge: (Array[] values) -> RSpec::Core::Set
end


builds.
piece of the stdlib. This helps to prevent false positive
potential to pollute a developers environment with an extra
constant time key lookups for unique arrays but without the
We use this to replace ‘::Set` so we can have the advantage of
@private

def <<(key)

Experimental RBS support (using type sampling data from the type_fusion project).

def <<: (RSpec::Core::Profiler key) -> RSpec::Core::Set

This signature was generated using 1 sample from 1 application.

def <<(key)
  @values[key] = true
  self
end

def clear

def clear
  @values.clear
  self
end

def delete(key)

def delete(key)
  @values.delete(key)
end

def each(&block)

Experimental RBS support (using type sampling data from the type_fusion project).

def each: () -> RSpec::Core::Set

This signature was generated using 5 samples from 1 application.

def each(&block)
  @values.keys.each(&block)
  self
end

def empty?

def empty?
  @values.empty?
end

def include?(key)

def include?(key)
  @values.key?(key)
end

def initialize(array=[])

Experimental RBS support (using type sampling data from the type_fusion project).

def initialize: (? array) -> void

This signature was generated using 3 samples from 1 application.

def initialize(array=[])
  @values = {}
  merge(array)
end

def merge(values)

Experimental RBS support (using type sampling data from the type_fusion project).

def merge: ( values) -> RSpec::Core::Set

This signature was generated using 2 samples from 1 application.

def merge(values)
  values.each do |key|
    @values[key] = true
  end
  self
end