Class: TypeProf::Utils::Set
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Instance Chain:
self,
Enumerable,
StructuralEquality
|
|
Inherits: | Object |
Defined in: | lib/typeprof/utils.rb |
Class Method Summary
- .[](*values)
- .new(tbl) ⇒ Set constructor
Instance Attribute Summary
- #tbl readonly
Instance Method Summary
Constructor Details
.new(tbl) ⇒ Set
Class Method Details
.[](*values)
[ GitHub ]Instance Attribute Details
#tbl (readonly)
[ GitHub ]# File 'lib/typeprof/utils.rb', line 21
attr_reader :tbl
Instance Method Details
#add(new_val)
[ GitHub ]#each(&blk)
[ GitHub ]# File 'lib/typeprof/utils.rb', line 36
def each(&blk) @tbl.each_key(&blk) end
#include?(elem) ⇒ Boolean
# File 'lib/typeprof/utils.rb', line 77
def include?(elem) @tbl[elem] end
#inspect
[ GitHub ]# File 'lib/typeprof/utils.rb', line 71
def inspect s = [] each {|v| s << v.inspect } "{#{ s.join(", ") }}" end
#intersection(other)
[ GitHub ]#map(&blk)
[ GitHub ]#size
[ GitHub ]# File 'lib/typeprof/utils.rb', line 58
def size @tbl.size end