Class: Movlog::Runner
- Inherits:
-
Object
- Object
- Movlog::Runner
- Defined in:
- lib/movlog/runner.rb
Overview
Executable code for file(s) in bin/ folder
Class Method Summary collapse
Class Method Details
.run!(args) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/movlog/runner.rb', line 6 def self.run!(args) omdb_keyword = ARGV[0] unless omdb_keyword puts 'USAGE: movlog [omdb_keyword]' exit(1) end movie = Movlog::Movie.find(t: omdb_keyword) puts "#{movie.title} (#{movie.year})" puts "Actors: #{movie.actors}" puts "Plot: #{movie.plot}" end |