Class: Appiconset::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/appiconset/cli.rb

Overview

entry point

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/appiconset/cli.rb', line 10

def exit_on_failure?
  true
end

Instance Method Details

#generatorObject



23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/appiconset/cli.rb', line 23

def generator
  generator = Appiconset::Generator.new

  begin
    generator.config(options[:input].to_s, options[:output].to_s)
    generator.square_platforms
    generator.any_platforms
  rescue StandardError => e
    warn e.message
    exit(1)
  end
end

#helpObject



36
37
38
39
# File 'lib/appiconset/cli.rb', line 36

def help
  super
  puts 'Online documentation: https://github.com/arthur87/appiconset'
end

#versionObject



16
17
18
# File 'lib/appiconset/cli.rb', line 16

def version
  puts(Appiconset::VERSION)
end