Class: FaaStRuby::Command::Function::Test
Class Method Summary
collapse
Instance Method Summary
collapse
#load_yaml
Methods inherited from BaseCommand
#has_user_logged_in?, #help, #load_credentials, #load_yaml, #say, spin, #spin, #write_file
Constructor Details
#initialize(args) ⇒ Test
Returns a new instance of Test.
7
8
9
10
11
12
|
# File 'lib/faastruby/cli/commands/function/test.rb', line 7
def initialize(args)
@args = args
load_yaml
@function_name = @yaml_config['name']
@test_command = @yaml_config['test_command']
end
|
Class Method Details
.help ⇒ Object
23
24
25
|
# File 'lib/faastruby/cli/commands/function/test.rb', line 23
def self.help
'test'
end
|
Instance Method Details
#run(do_not_exit: false) ⇒ Object
14
15
16
17
18
19
20
21
|
# File 'lib/faastruby/cli/commands/function/test.rb', line 14
def run(do_not_exit: false)
unless @test_command
return true
end
system(@test_command)
end
|
#usage ⇒ Object
27
28
29
|
# File 'lib/faastruby/cli/commands/function/test.rb', line 27
def usage
"\nUsage: faastruby #{self.class.help}"
end
|