Class: Epuber::Compiler::Problem::Location

Inherits:
Object
  • Object
show all
Defined in:
lib/epuber/compiler/problem.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(line, column, length = nil) ⇒ Location

Returns a new instance of Location.



9
10
11
12
13
# File 'lib/epuber/compiler/problem.rb', line 9

def initialize(line, column, length = nil)
  @line = line
  @column = column
  @length = length || 1
end

Instance Attribute Details

#columnObject (readonly)

Returns the value of attribute column.



7
8
9
# File 'lib/epuber/compiler/problem.rb', line 7

def column
  @column
end

#lengthObject (readonly)

Returns the value of attribute length.



7
8
9
# File 'lib/epuber/compiler/problem.rb', line 7

def length
  @length
end

#lineObject (readonly)

Returns the value of attribute line.



7
8
9
# File 'lib/epuber/compiler/problem.rb', line 7

def line
  @line
end