Module: AppTester::Utils Abstract
- Extended by:
- Utils
- Includes:
- Colours
- Included in:
- Utils
- Defined in:
- lib/app-tester/utils.rb,
lib/app-tester/utils/colors.rb,
lib/app-tester/utils/strings.rb
Overview
This module is abstract.
Helper utilities module
Defined Under Namespace
Instance Method Summary collapse
-
#file_to_array(file) ⇒ Array
Convert a file to an array.
Methods included from Colours
#black, #blue, #brown, #cyan, #dark_gray, #green, #light_blue, #light_cyan, #light_gray, #light_green, #light_purple, #light_red, #purple, #red, #white, #yellow
Instance Method Details
#file_to_array(file) ⇒ Array
Convert a file to an array
17 18 19 20 21 22 23 24 25 |
# File 'lib/app-tester/utils.rb', line 17 def file_to_array file lines = [] File.open(file, "r") do |infile| while (line = infile.gets) lines.push(line.gsub("\n", "").rstrip) end end lines end |