Class: IDL::Scanner::Position

Inherits:
Struct
  • Object
show all
Defined in:
lib/ridl/scanner.rb,
lib/ridl/scanner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#columnObject

Returns the value of attribute column

Returns:

  • (Object)

    the current value of column



34
35
36
# File 'lib/ridl/scanner.rb', line 34

def column
  @column
end

#lineObject

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



34
35
36
# File 'lib/ridl/scanner.rb', line 34

def line
  @line
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



34
35
36
# File 'lib/ridl/scanner.rb', line 34

def name
  @name
end

Instance Method Details

#inspectObject



40
41
42
# File 'lib/ridl/scanner.rb', line 40

def inspect
  to_s
end

#to_sObject



37
38
39
# File 'lib/ridl/scanner.rb', line 37

def to_s
  format('%s: line %d, column %d', name.to_s, line, column)
end