Last active
March 25, 2017 11:03
-
-
Save fee1good/9ab514101093a71c313128491471e619 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
movie = ARGV[0] || 'movies.txt' | |
if !File.exist?(movie) | |
p 'File error' | |
return | |
end | |
File.readlines(movie).each do |line| | |
ar_line = line.split('|') | |
if ar_line[1].include?("Godfather") | |
p ar_line[1] | |
p '*' * ((ar_line[7].to_f - 8) * 10.0).round | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment