Class: TypeProf::Type::Symbol
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
::TypeProf::Type
|
|
Instance Chain:
|
|
Inherits: |
TypeProf::Type
|
Defined in: | lib/typeprof/type.rb |
Constant Summary
::TypeProf::Type
- Inherited
Class Method Summary
- .new(sym, base_type) ⇒ Symbol constructor
::TypeProf::Type
- Inherited
Instance Attribute Summary
- #base_type readonly
- #sym readonly
Instance Method Summary
- #consistent?(other) ⇒ Boolean
- #inspect
- #method_dispatch_info
- #screen_name(scratch)
- #substitute(_subst, _depth)
::TypeProf::Type
- Inherited
Constructor Details
.new(sym, base_type) ⇒ Symbol
Instance Attribute Details
#base_type (readonly)
[ GitHub ]# File 'lib/typeprof/type.rb', line 663
attr_reader :sym, :base_type
#sym (readonly)
[ GitHub ]# File 'lib/typeprof/type.rb', line 663
attr_reader :sym, :base_type
Instance Method Details
#consistent?(other) ⇒ Boolean
# File 'lib/typeprof/type.rb', line 669
def consistent?(other) case other when Symbol @sym == other.sym else @base_type.consistent?(other) end end
#inspect
[ GitHub ]# File 'lib/typeprof/type.rb', line 665
def inspect "Type::Symbol[#{ @sym ? @sym.inspect : "(dynamic symbol)" }, #{ @base_type.inspect }]" end
#method_dispatch_info
[ GitHub ]# File 'lib/typeprof/type.rb', line 686
def method_dispatch_info @base_type.method_dispatch_info end
#screen_name(scratch)
[ GitHub ]# File 'lib/typeprof/type.rb', line 678
def screen_name(scratch) if @sym @sym.inspect else @base_type.screen_name(scratch) end end
#substitute(_subst, _depth)
[ GitHub ]# File 'lib/typeprof/type.rb', line 690
def substitute(_subst, _depth) self # dummy end