class Formatter::FORMATPROGRAM
Public Class Methods
header(program)
click to toggle source
# File lib/berklee_valencia/formatter.rb, line 90 def self.header(program) border = "" (program.title.length + 4).times {border << "-"} puts "" 2.times {puts border} puts " #{program.title}" puts " #{program.type}" end
highlights(program)
click to toggle source
# File lib/berklee_valencia/formatter.rb, line 107 def self.highlights(program) puts "--------------------------------------------------------------------------------" puts " Program Highlights" puts "--------------------------------------------------------------------------------" program.highlights.each do |highlight| puts "| #{highlight[:hl_title]} |" puts "#{wrap(highlight[:hl_body])}" puts "" end end
intro(program)
click to toggle source
# File lib/berklee_valencia/formatter.rb, line 99 def self.intro(program) puts "--------------------------------------------------------------------------------" puts " Introduction" puts "--------------------------------------------------------------------------------" puts "#{wrap(program.introduction)}" puts "" end
more_info(program)
click to toggle source
# File lib/berklee_valencia/formatter.rb, line 118 def self.more_info(program) puts "--------------------------------------------------------------------------------" puts " For full program information:" puts "--------------------------------------------------------------------------------" puts "Type 'open' to visit program homepage or hit enter to see more options." 2.times {puts "--------------------------------------------------------------------------------"} 2.times {puts ""} input = gets.strip if input == "open" system("open #{program.url}") end end