Class: Epuber::Compiler::Problem::Location
- Inherits:
-
Object
- Object
- Epuber::Compiler::Problem::Location
- Defined in:
- lib/epuber/compiler/problem.rb
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#length ⇒ Object
readonly
Returns the value of attribute length.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
Instance Method Summary collapse
-
#initialize(line, column, length = nil) ⇒ Location
constructor
A new instance of Location.
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
#column ⇒ Object (readonly)
Returns the value of attribute column.
9 10 11 |
# File 'lib/epuber/compiler/problem.rb', line 9 def column @column end |
#length ⇒ Object (readonly)
Returns the value of attribute length.
10 11 12 |
# File 'lib/epuber/compiler/problem.rb', line 10 def length @length end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
8 9 10 |
# File 'lib/epuber/compiler/problem.rb', line 8 def line @line end |