Class: Yoda::Typing::Inferencer::Tracer::MaskedMap

Inherits:
Object
  • Object
show all
Defined in:
lib/yoda/typing/inferencer/tracer.rb

Instance Method Summary collapse

Constructor Details

#initialize ⇒ MaskedMap

Returns a new instance of MaskedMap.



36
37
38
# File 'lib/yoda/typing/inferencer/tracer.rb', line 36

def initialize
  @content = {}
end

Instance Method Details

#[](key) ⇒ Object



40
41
42
# File 'lib/yoda/typing/inferencer/tracer.rb', line 40

def [](key)
  @content[key]
end

#[]=(key, value) ⇒ Object



44
45
46
# File 'lib/yoda/typing/inferencer/tracer.rb', line 44

def []=(key, value)
  @content[key] = value
end

#inspect ⇒ Object



56
57
58
# File 'lib/yoda/typing/inferencer/tracer.rb', line 56

def inspect
  "(#{@content.length} items)"
end

#to_h ⇒ Object



52
53
54
# File 'lib/yoda/typing/inferencer/tracer.rb', line 52

def to_h
  @content
end

#to_s ⇒ Object



48
49
50
# File 'lib/yoda/typing/inferencer/tracer.rb', line 48

def to_s
  inspect
end