Class: Google::Apis::FirebaserulesV1::SourcePosition

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/firebaserules_v1/classes.rb,
lib/google/apis/firebaserules_v1/representations.rb,
lib/google/apis/firebaserules_v1/representations.rb

Overview

Position in the Source content including its line, column number, and an index of the File in the Source message. Used for debug purposes.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SourcePosition

Returns a new instance of SourcePosition.



510
511
512
# File 'lib/google/apis/firebaserules_v1/classes.rb', line 510

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#columnFixnum

First column on the source line associated with the source fragment. Corresponds to the JSON property column

Returns:

  • (Fixnum)


488
489
490
# File 'lib/google/apis/firebaserules_v1/classes.rb', line 488

def column
  @column
end

#current_offsetFixnum

Start position relative to the beginning of the file. Corresponds to the JSON property currentOffset

Returns:

  • (Fixnum)


493
494
495
# File 'lib/google/apis/firebaserules_v1/classes.rb', line 493

def current_offset
  @current_offset
end

#end_offsetFixnum

End position relative to the beginning of the file. Corresponds to the JSON property endOffset

Returns:

  • (Fixnum)


498
499
500
# File 'lib/google/apis/firebaserules_v1/classes.rb', line 498

def end_offset
  @end_offset
end

#file_nameString

Name of the File. Corresponds to the JSON property fileName

Returns:

  • (String)


503
504
505
# File 'lib/google/apis/firebaserules_v1/classes.rb', line 503

def file_name
  @file_name
end

#lineFixnum

Line number of the source fragment. 1-based. Corresponds to the JSON property line

Returns:

  • (Fixnum)


508
509
510
# File 'lib/google/apis/firebaserules_v1/classes.rb', line 508

def line
  @line
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



515
516
517
518
519
520
521
# File 'lib/google/apis/firebaserules_v1/classes.rb', line 515

def update!(**args)
  @column = args[:column] if args.key?(:column)
  @current_offset = args[:current_offset] if args.key?(:current_offset)
  @end_offset = args[:end_offset] if args.key?(:end_offset)
  @file_name = args[:file_name] if args.key?(:file_name)
  @line = args[:line] if args.key?(:line)
end