Class: Forthic::CodeLocation
- Inherits:
-
Object
- Object
- Forthic::CodeLocation
- Defined in:
- lib/forthic/code_location.rb
Instance Attribute Summary collapse
-
#column ⇒ Object
Returns the value of attribute column.
-
#end_pos ⇒ Object
Returns the value of attribute end_pos.
-
#line ⇒ Object
Returns the value of attribute line.
-
#screen_name ⇒ Object
Returns the value of attribute screen_name.
-
#start_pos ⇒ Object
Returns the value of attribute start_pos.
Instance Method Summary collapse
-
#initialize(screen_name: "<ad-hoc>", line: 1, column: 1, start_pos: 0, end_pos: 0) ⇒ CodeLocation
constructor
A new instance of CodeLocation.
Constructor Details
#initialize(screen_name: "<ad-hoc>", line: 1, column: 1, start_pos: 0, end_pos: 0) ⇒ CodeLocation
Returns a new instance of CodeLocation.
12 13 14 15 16 17 18 |
# File 'lib/forthic/code_location.rb', line 12 def initialize(screen_name: "<ad-hoc>", line: 1, column: 1, start_pos: 0, end_pos: 0) @screen_name = screen_name @line = line @column = column @start_pos = start_pos @end_pos = end_pos end |
Instance Attribute Details
#column ⇒ Object
Returns the value of attribute column.
5 6 7 |
# File 'lib/forthic/code_location.rb', line 5 def column @column end |
#end_pos ⇒ Object
Returns the value of attribute end_pos.
5 6 7 |
# File 'lib/forthic/code_location.rb', line 5 def end_pos @end_pos end |
#line ⇒ Object
Returns the value of attribute line.
5 6 7 |
# File 'lib/forthic/code_location.rb', line 5 def line @line end |
#screen_name ⇒ Object
Returns the value of attribute screen_name.
5 6 7 |
# File 'lib/forthic/code_location.rb', line 5 def screen_name @screen_name end |
#start_pos ⇒ Object
Returns the value of attribute start_pos.
5 6 7 |
# File 'lib/forthic/code_location.rb', line 5 def start_pos @start_pos end |