Class: Gif2lgtm::Cli
- Inherits:
-
Thor
- Object
- Thor
- Gif2lgtm::Cli
- Defined in:
- lib/gif2lgtm/cli.rb
Constant Summary collapse
- SUPPORT_FORMARTS =
['GIF', 'PNG', 'JPEG', 'JPG'].freeze
Instance Method Summary collapse
Instance Method Details
#start(*images) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/gif2lgtm/cli.rb', line 8 def start(*images) # TODO: test images.each do |image| ext = File.extname(image).delete('.').upcase if SUPPORT_FORMARTS.include?(ext) Gif2lgtm::Main.start(image) else puts "extension: #{ext}" puts 'This extension is not allowed.' puts end end end |