Class: Steep::AST::Types::Bot
- Inherits:
-
Object
- Object
- Steep::AST::Types::Bot
- Defined in:
- lib/steep/ast/types/bot.rb
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #free_variables ⇒ Object
- #hash ⇒ Object
-
#initialize(location: nil) ⇒ Bot
constructor
A new instance of Bot.
- #level ⇒ Object
- #subst(s) ⇒ Object
- #to_s ⇒ Object
- #with_location(new_location) ⇒ Object
Constructor Details
#initialize(location: nil) ⇒ Bot
Returns a new instance of Bot.
7 8 9 |
# File 'lib/steep/ast/types/bot.rb', line 7 def initialize(location: nil) @location = location end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
5 6 7 |
# File 'lib/steep/ast/types/bot.rb', line 5 def location @location end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
11 12 13 |
# File 'lib/steep/ast/types/bot.rb', line 11 def ==(other) other.is_a?(Bot) end |
#free_variables ⇒ Object
29 30 31 |
# File 'lib/steep/ast/types/bot.rb', line 29 def free_variables Set.new end |
#hash ⇒ Object
15 16 17 |
# File 'lib/steep/ast/types/bot.rb', line 15 def hash self.class.hash end |
#level ⇒ Object
33 34 35 |
# File 'lib/steep/ast/types/bot.rb', line 33 def level [2] end |
#subst(s) ⇒ Object
21 22 23 |
# File 'lib/steep/ast/types/bot.rb', line 21 def subst(s) self end |
#to_s ⇒ Object
25 26 27 |
# File 'lib/steep/ast/types/bot.rb', line 25 def to_s "⟘" end |
#with_location(new_location) ⇒ Object
37 38 39 |
# File 'lib/steep/ast/types/bot.rb', line 37 def with_location(new_location) self.class.new(location: new_location) end |