Class: Rocketwheel::Command::CLI::Build

Inherits:
Base
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/rocketwheel/command/cli/build.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

filename, #help, #method_missing, start

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Rocketwheel::Command::CLI::Base

Class Method Details

.source_rootObject



7
8
9
# File 'lib/rocketwheel/command/cli/build.rb', line 7

def self.source_root
  File.expand_path("./")
end

Instance Method Details

#buildObject



20
21
22
23
24
25
26
# File 'lib/rocketwheel/command/cli/build.rb', line 20

def build
  directory source, destination
  say_status :downloading, 'demoplayer'
  player.download_and_unzip(File.join(destination, 'demoplayer'))
rescue Rocketwheel::Command::PlayerNotFound => e
  raise Thor::Error, "#{e.message} Run `rocket versions` to see a full list of available players."
end