Class: Spandx::Cli::Main
- Inherits:
-
Thor
- Object
- Thor
- Spandx::Cli::Main
- Defined in:
- lib/spandx/cli/main.rb
Instance Method Summary collapse
Instance Method Details
#build ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'lib/spandx/cli/main.rb', line 37 def build(*) if [:help] invoke :help, ['build'] else Spandx.logger = Logger.new([:logfile]) Commands::Build.new().execute end end |
#pull ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/spandx/cli/main.rb', line 24 def pull(*) if [:help] invoke :help, ['pull'] else Commands::Pull.new().execute end end |
#scan(lockfile = Pathname.pwd) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/spandx/cli/main.rb', line 14 def scan(lockfile = Pathname.pwd) return invoke :help, ['scan'] if [:help] prepare() pull if [:pull] Spandx::Cli::Commands::Scan.new(lockfile, ).execute end |
#version ⇒ Object
47 48 49 |
# File 'lib/spandx/cli/main.rb', line 47 def version puts "v#{Spandx::VERSION}" end |