Class: Steep::AST::Types::Instance
Constant Summary collapse
- @@fvs =
Set[instance]
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #free_variables ⇒ Object
- #hash ⇒ Object
- #level ⇒ Object
- #subst(s) ⇒ Object
- #to_s ⇒ Object
Methods included from SharedInstance
Methods included from Helper::NoChild
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
7 8 9 |
# File 'lib/steep/ast/types/instance.rb', line 7 def ==(other) other.is_a?(Instance) end |
#free_variables ⇒ Object
26 27 28 |
# File 'lib/steep/ast/types/instance.rb', line 26 def free_variables @@fvs end |
#hash ⇒ Object
11 12 13 |
# File 'lib/steep/ast/types/instance.rb', line 11 def hash self.class.hash end |
#level ⇒ Object
36 37 38 |
# File 'lib/steep/ast/types/instance.rb', line 36 def level [0] end |
#subst(s) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/steep/ast/types/instance.rb', line 17 def subst(s) if s.instance_type s.instance_type else self end end |
#to_s ⇒ Object
32 33 34 |
# File 'lib/steep/ast/types/instance.rb', line 32 def to_s "instance" end |