Class: RSpectre::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/rspectre/node.rb

Instance Method Summary collapse

Instance Method Details

#end_columnObject



11
12
13
14
15
16
17
# File 'lib/rspectre/node.rb', line 11

def end_column
  if single_line?
    location.last_column + 1
  else
    source_line.length + 1
  end
end

#source_lineObject



19
20
21
# File 'lib/rspectre/node.rb', line 19

def source_line
  location.expression.source_line.rstrip
end

#start_columnObject



7
8
9
# File 'lib/rspectre/node.rb', line 7

def start_column
  location.column + 1
end