Class: Iota::CLI

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

Defined Under Namespace

Classes: Create, Deploy, Rollback

Instance Method Summary collapse

Instance Method Details

#create(function_name) ⇒ Object



39
40
41
42
# File 'lib/iota/cli.rb', line 39

def create(function_name)
  require "iota/cli/create"
  Create.new(options, function_name, self).run
end

#deploy(environment) ⇒ Object



23
24
25
26
# File 'lib/iota/cli.rb', line 23

def deploy(environment)
  require 'iota/cli/deploy'
  Deploy.new(options, environment.to_sym, self).run
end

#list_functionsObject



11
12
13
14
15
16
17
# File 'lib/iota/cli.rb', line 11

def list_functions
  if options[:verbose]
    puts Iota.client.list_functions.functions
  else
    puts Iota.client.list_functions.functions.map(&:function_name)
  end
end


45
46
47
# File 'lib/iota/cli.rb', line 45

def print_version
  puts Iota::VERSION
end

#rollback(environment) ⇒ Object



31
32
33
34
# File 'lib/iota/cli.rb', line 31

def rollback(environment)
  require 'iota/cli/rollback'
  Rollback.new(options, environment.to_sym, self).run
end