Class: DirectionNotFoundError

Inherits:
CompilerError show all
Defined in:
lib/compiler_error.rb

Instance Method Summary collapse

Methods inherited from CompilerError

#to_s

Constructor Details

#initialize(ast, client, direction, server) ⇒ DirectionNotFoundError

Returns a new instance of DirectionNotFoundError.



139
140
141
142
143
144
# File 'lib/compiler_error.rb', line 139

def initialize ast, client, direction, server
  super ast.position
  @client = client
  @direction = direction
  @server = server
end

Instance Method Details

#infoObject



146
147
148
149
150
151
152
153
# File 'lib/compiler_error.rb', line 146

def info
  case @direction
  when :left
    "'#{@client.name} -> #{@server.name}' : undefined direction"
  when :right
    "'#{@client.name} <- #{@server.name}' : undefined direction"
  end
end