Module: Belajar::Terminal

Defined in:
lib/belajar/terminal.rb,
lib/belajar/terminal/cli.rb,
lib/belajar/terminal/setup.rb,
lib/belajar/terminal/output.rb,
lib/belajar/terminal/courses.rb,
lib/belajar/terminal/welcome.rb,
lib/belajar/terminal/solutions.rb

Defined Under Namespace

Modules: Output Classes: CLI, Courses, Setup, Solutions, Welcome

Class Method Summary collapse

Class Method Details

.text(file_name) ⇒ Object

text should be of a width of 70 columns or less



4
5
6
7
8
9
# File 'lib/belajar/terminal.rb', line 4

def self.text(file_name)
  texts_path = File.expand_path('../terminal/texts', __FILE__)
  file       = File.join(texts_path, "#{file_name}.txt")

  File.exist?(file) ? File.read(file).to_s : ''
end