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



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

def column
  @column
end

#lineObject

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



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

def line
  @line
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



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

def name
  @name
end

Instance Method Details

#inspectObject



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

def inspect
  to_s
end

#to_sObject



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

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