Class: Curlybars::Position

Inherits:
Struct
  • Object
show all
Defined in:
lib/curlybars/position.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file_name, line_number, line_offset, length = 0) ⇒ Position

Returns a new instance of Position.



3
4
5
# File 'lib/curlybars/position.rb', line 3

def initialize(file_name, line_number, line_offset, length = 0)
  super
end

Instance Attribute Details

#file_nameObject

Returns the value of attribute file_name

Returns:

  • (Object)

    the current value of file_name



2
3
4
# File 'lib/curlybars/position.rb', line 2

def file_name
  @file_name
end

#lengthObject

Returns the value of attribute length

Returns:

  • (Object)

    the current value of length



2
3
4
# File 'lib/curlybars/position.rb', line 2

def length
  @length
end

#line_numberObject

Returns the value of attribute line_number

Returns:

  • (Object)

    the current value of line_number



2
3
4
# File 'lib/curlybars/position.rb', line 2

def line_number
  @line_number
end

#line_offsetObject

Returns the value of attribute line_offset

Returns:

  • (Object)

    the current value of line_offset



2
3
4
# File 'lib/curlybars/position.rb', line 2

def line_offset
  @line_offset
end