Class: FiberAudit::Runtime::Location

Inherits:
Data
  • Object
show all
Defined in:
lib/fiber_audit/runtime/location.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path:, line: nil, column: nil) ⇒ Location

Returns a new instance of Location.



9
10
11
12
13
14
15
# File 'lib/fiber_audit/runtime/location.rb', line 9

def initialize(path:, line: nil, column: nil)
  super(
    path: normalize_path(path),
    line: Validation.integer(line, 'line', minimum: 1, allow_nil: true),
    column: Validation.integer(column, 'column', allow_nil: true)
  )
end

Instance Attribute Details

#columnObject (readonly)

Returns the value of attribute column

Returns:

  • (Object)

    the current value of column



8
9
10
# File 'lib/fiber_audit/runtime/location.rb', line 8

def column
  @column
end

#lineObject (readonly)

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



8
9
10
# File 'lib/fiber_audit/runtime/location.rb', line 8

def line
  @line
end

#pathObject (readonly)

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



8
9
10
# File 'lib/fiber_audit/runtime/location.rb', line 8

def path
  @path
end