Class: Flexr::Runtime::Location
- Inherits:
-
Struct
- Object
- Struct
- Flexr::Runtime::Location
- Defined in:
- lib/flexr/runtime/location.rb
Instance Attribute Summary collapse
-
#byte_begin ⇒ Object
Returns the value of attribute byte_begin.
-
#byte_end ⇒ Object
Returns the value of attribute byte_end.
-
#column_begin ⇒ Object
Returns the value of attribute column_begin.
-
#column_end ⇒ Object
Returns the value of attribute column_end.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#line_begin ⇒ Object
Returns the value of attribute line_begin.
-
#line_end ⇒ Object
Returns the value of attribute line_end.
Instance Method Summary collapse
-
#initialize(**values) ⇒ Location
constructor
A new instance of Location.
Constructor Details
#initialize(**values) ⇒ Location
Returns a new instance of Location.
9 10 11 12 13 14 15 |
# File 'lib/flexr/runtime/location.rb', line 9 def initialize(**values) @column_values = values.delete(:column_values) eager_columns = values.delete(:eager_columns) super(**values) # rubocop:disable Style/SuperArguments self.column_begin = @column_values.first if eager_columns && @column_values self.column_end = @column_values.last if eager_columns && @column_values end |
Instance Attribute Details
#byte_begin ⇒ Object
Returns the value of attribute byte_begin
5 6 7 |
# File 'lib/flexr/runtime/location.rb', line 5 def byte_begin @byte_begin end |
#byte_end ⇒ Object
Returns the value of attribute byte_end
5 6 7 |
# File 'lib/flexr/runtime/location.rb', line 5 def byte_end @byte_end end |
#column_begin ⇒ Object
Returns the value of attribute column_begin
5 6 7 |
# File 'lib/flexr/runtime/location.rb', line 5 def column_begin @column_begin end |
#column_end ⇒ Object
Returns the value of attribute column_end
5 6 7 |
# File 'lib/flexr/runtime/location.rb', line 5 def column_end @column_end end |
#filename ⇒ Object
Returns the value of attribute filename
5 6 7 |
# File 'lib/flexr/runtime/location.rb', line 5 def filename @filename end |
#line_begin ⇒ Object
Returns the value of attribute line_begin
5 6 7 |
# File 'lib/flexr/runtime/location.rb', line 5 def line_begin @line_begin end |
#line_end ⇒ Object
Returns the value of attribute line_end
5 6 7 |
# File 'lib/flexr/runtime/location.rb', line 5 def line_end @line_end end |