Class: Flexr::Runtime::Location

Inherits:
Struct
  • Object
show all
Defined in:
lib/flexr/runtime/location.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_beginObject

Returns the value of attribute byte_begin

Returns:

  • (Object)

    the current value of byte_begin



5
6
7
# File 'lib/flexr/runtime/location.rb', line 5

def byte_begin
  @byte_begin
end

#byte_endObject

Returns the value of attribute byte_end

Returns:

  • (Object)

    the current value of byte_end



5
6
7
# File 'lib/flexr/runtime/location.rb', line 5

def byte_end
  @byte_end
end

#column_beginObject

Returns the value of attribute column_begin

Returns:

  • (Object)

    the current value of column_begin



5
6
7
# File 'lib/flexr/runtime/location.rb', line 5

def column_begin
  @column_begin
end

#column_endObject

Returns the value of attribute column_end

Returns:

  • (Object)

    the current value of column_end



5
6
7
# File 'lib/flexr/runtime/location.rb', line 5

def column_end
  @column_end
end

#filenameObject

Returns the value of attribute filename

Returns:

  • (Object)

    the current value of filename



5
6
7
# File 'lib/flexr/runtime/location.rb', line 5

def filename
  @filename
end

#line_beginObject

Returns the value of attribute line_begin

Returns:

  • (Object)

    the current value of line_begin



5
6
7
# File 'lib/flexr/runtime/location.rb', line 5

def line_begin
  @line_begin
end

#line_endObject

Returns the value of attribute line_end

Returns:

  • (Object)

    the current value of line_end



5
6
7
# File 'lib/flexr/runtime/location.rb', line 5

def line_end
  @line_end
end