In Files

  • typeprof-0.12.0/lib/typeprof/utils.rb

Parent

Included Modules

Class/Module Index [+]

Quicksearch

TypeProf::Utils::MutableSet

Public Class Methods

new(*values) click to toggle source
 
               # File typeprof-0.12.0/lib/typeprof/utils.rb, line 95
def initialize(*values)
  @hash = {}
  values.each {|v| @hash[v] = v }
end
            

Public Instance Methods

<<(v) click to toggle source
 
               # File typeprof-0.12.0/lib/typeprof/utils.rb, line 106
def <<(v)
  @hash[v] = true
end
            
[](v) click to toggle source
 
               # File typeprof-0.12.0/lib/typeprof/utils.rb, line 110
def [](v)
  @hash[v]
end
            
delete(v) click to toggle source
 
               # File typeprof-0.12.0/lib/typeprof/utils.rb, line 114
def delete(v)
  @hash.delete(v)
end
            
each(&blk) click to toggle source
 
               # File typeprof-0.12.0/lib/typeprof/utils.rb, line 100
def each(&blk)
  @hash.each_key(&blk)
end
            
inspect() click to toggle source
 
               # File typeprof-0.12.0/lib/typeprof/utils.rb, line 118
def inspect
  s = []
  each {|v| s << v.inspect }
  "{#{ s.join(", ") }}"
end
            
size() click to toggle source
 
               # File typeprof-0.12.0/lib/typeprof/utils.rb, line 124
def size
  @hash.size
end
            
to_set() click to toggle source
 
               # File typeprof-0.12.0/lib/typeprof/utils.rb, line 128
def to_set
  Set[*@hash.keys]
end