module Tagline::ScreenPrinter
Public Class Methods
print_screen(line)
click to toggle source
# File lib/tagline/screen_printer.rb, line 4 def print_screen(line) system('clear') || system('cls') puts '********** Tagline *************' puts "********************************\n\n" puts ' * Press UP to see previous' puts ' * Press DOWN to see next' Tagline.tags.each do |tag, chord| puts " * Press #{chord.chr.inspect} to toggle #{tag}" end puts ' * Press "n" to toggle next_on_tag' puts ' * Press CTRL+X to exit' puts "\nTags: " Tagline.tags.keys.each do |tag| puts " #{tag}: #{line[tag]}" end print "\n=> #{line.text}" end