Class: CLI

Inherits:
Thor
  • Object
show all
Includes:
CLISplash
Defined in:
lib/splash/cli.rb

Overview

The CLI Command structure for Thor

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ CLI

Constructor override to manage debug, colors and emoji options for logger



13
14
15
16
17
18
19
20
21
# File 'lib/splash/cli.rb', line 13

def initialize(*args)
  super
  log = get_logger
  options[:colors.to_s]
  log.level = :debug if options[:debug]
  log.emoji  = options[:emoji.to_s]
  log.color  = options[:colors.to_s]
  log.debug  "DEBUG activated" if options[:debug]
end

Class Method Details

.exit_on_failure?Boolean

callback for managing ARGV errors

Returns:

  • (Boolean)


8
9
10
# File 'lib/splash/cli.rb', line 8

def self.exit_on_failure?
  true
end