Class: Steep::AST::Types::Bot

Inherits:
Object
  • Object
show all
Defined in:
lib/steep/ast/types/bot.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#locationObject (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_variablesObject



29
30
31
# File 'lib/steep/ast/types/bot.rb', line 29

def free_variables
  Set.new
end

#hashObject



15
16
17
# File 'lib/steep/ast/types/bot.rb', line 15

def hash
  self.class.hash
end

#levelObject



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_sObject



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