Class: Lecture::Slide::Center
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Lecture::Slide::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Lecture::Slide::Base
Instance Method Details
#display ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/lecture/slide/center.rb', line 6 def display content.each_line.with_index do |line, i| col = [1, 1 + (cols - line.chomp.uncolorize.length) / 2].max print_line(line, col, row + i) end end |