Class: FaaStRuby::Command::Update

Inherits:
BaseCommand show all
Defined in:
lib/faastruby/cli/commands.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseCommand

#has_user_logged_in?, #help, #load_credentials, #load_yaml, #say, spin, #spin, #write_file

Constructor Details

#initialize(args) ⇒ Update

Returns a new instance of Update.



132
133
134
135
# File 'lib/faastruby/cli/commands.rb', line 132

def initialize(args)
  @args = args
  help
end

Class Method Details

.helpObject



141
142
143
# File 'lib/faastruby/cli/commands.rb', line 141

def self.help
  "update"
end

Instance Method Details

#runObject



137
138
139
# File 'lib/faastruby/cli/commands.rb', line 137

def run
  exec "gem update faastruby"
end

#usageObject



145
146
147
148
# File 'lib/faastruby/cli/commands.rb', line 145

def usage
  puts "\n# Update FaaStRuby CLI to the latest version."
  puts "\nUsage: faastruby #{self.class.help}\n\n"
end