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.



12
13
14
15
16
# File 'lib/epuber/compiler/problem.rb', line 12

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.



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

def column
  @column
end

#lengthObject (readonly)

Returns the value of attribute length.



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

def length
  @length
end

#lineObject (readonly)

Returns the value of attribute line.



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

def line
  @line
end