Class: FliVideo::CLI
- Inherits:
-
Object
- Object
- FliVideo::CLI
- Defined in:
- lib/fli_video/cli.rb
Overview
FliVideo::CLI is the command line interface for the FliVideo gem.
Class Method Summary collapse
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(args) ⇒ CLI
constructor
A new instance of CLI.
Constructor Details
#initialize(args) ⇒ CLI
Returns a new instance of CLI.
12 13 14 |
# File 'lib/fli_video/cli.rb', line 12 def initialize(args) @args = args end |
Class Method Details
.start(args) ⇒ Object
8 9 10 |
# File 'lib/fli_video/cli.rb', line 8 def self.start(args) new(args).execute end |
Instance Method Details
#execute ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/fli_video/cli.rb', line 16 def execute if @args.empty? puts 'FliVideo CLI - No command provided' return end case @args.first when 'version' puts "FliVideo version #{FliVideo::VERSION}" else puts "Unknown command: #{@args.first}" end end |