Class: Mentor::LineOfCode
- Inherits:
-
String
- Object
- String
- Mentor::LineOfCode
- Includes:
- Outputs
- Defined in:
- lib/sections/line_of_code.rb
Instance Method Summary collapse
-
#initialize(lineno, line, max_length) ⇒ LineOfCode
constructor
A new instance of LineOfCode.
Methods included from OutputHelper
#a_an, #and_sentence, #culprit_line, #home_to_tilde, #indent_lines, #lines_from_file, #or_sentence, #pluralize, #pluralize_words, #terminal_width, #valid_var_name
Constructor Details
#initialize(lineno, line, max_length) ⇒ LineOfCode
Returns a new instance of LineOfCode.
7 8 9 10 11 12 |
# 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 |