class Mentor::LineOfCode

Public Class Methods

new(lineno, line, max_length) click to toggle source
Calls superclass method
# File lib/sections/line_of_code.rb, line 7
def initialize(lineno, line, max_length)
  @lineno     = lineno
  @line       = line
  @max_length = max_length
  super("#{padded_lineno}:  #{@line}")
end

Private Instance Methods

error_lineno?() click to toggle source
# File lib/sections/line_of_code.rb, line 24
def error_lineno?
  @lineno == Mentor.tp.lineno
end
padded_lineno() click to toggle source
# File lib/sections/line_of_code.rb, line 16
def padded_lineno
  if error_lineno?
    error_lineno_padded(@max_length)
  else
    lineno_subtle_padded(@max_length)
  end
end