Sha256: 679e35014b5c9b69b883080ad7c0b626a1dd8ec8554b668ea0c085f3a0d253e7

Contents?: true

Size: 315 Bytes

Versions: 4

Compression:

Stored size: 315 Bytes

Contents

module Daigaku
  module Terminal
    # text should be of a width of 70 columns or less
    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
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
daigaku-1.0.0 lib/daigaku/terminal.rb
daigaku-0.6.0 lib/daigaku/terminal.rb
daigaku-0.5.0 lib/daigaku/terminal.rb
daigaku-0.4.0 lib/daigaku/terminal.rb