Class: Steep::AST::Types::Nil
- Extended by:
- SharedInstance
- Includes:
- Helper::NoChild, Helper::NoFreeVariables
- Defined in:
- lib/steep/ast/types/nil.rb
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #back_type ⇒ Object
- #hash ⇒ Object
- #level ⇒ Object
- #subst(s) ⇒ Object
- #to_s ⇒ Object
Methods included from SharedInstance
Methods included from Helper::NoChild
Methods included from Helper::NoFreeVariables
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
7 8 9 |
# File 'lib/steep/ast/types/nil.rb', line 7 def ==(other) other.is_a?(Nil) end |
#back_type ⇒ Object
33 34 35 36 |
# File 'lib/steep/ast/types/nil.rb', line 33 def back_type Name::Instance.new(name: Builtin::NilClass.module_name, args: []) end |
#hash ⇒ Object
11 12 13 |
# File 'lib/steep/ast/types/nil.rb', line 11 def hash self.class.hash end |
#level ⇒ Object
29 30 31 |
# File 'lib/steep/ast/types/nil.rb', line 29 def level [0] end |
#subst(s) ⇒ Object
17 18 19 |
# File 'lib/steep/ast/types/nil.rb', line 17 def subst(s) self end |
#to_s ⇒ Object
21 22 23 |
# File 'lib/steep/ast/types/nil.rb', line 21 def to_s "nil" end |