Class: TasteTester::NoOp
- Inherits:
-
Object
show all
- Includes:
- BetweenMeals::Util, Logging
- Defined in:
- lib/taste_tester/noop.rb
Overview
Wrapper for running commands on local system
Instance Method Summary
collapse
Methods included from Logging
#formatter, formatterproc=, logger, #logger, use_log_formatter=, verbosity=
Constructor Details
#initialize ⇒ NoOp
Returns a new instance of NoOp.
25
26
27
28
29
30
|
# File 'lib/taste_tester/noop.rb', line 25
def initialize
print_noop_warning
@host = 'localhost'
@user = ENV['USER']
@cmds = []
end
|
Instance Method Details
#add(string) ⇒ Object
Also known as:
<<
42
43
44
|
# File 'lib/taste_tester/noop.rb', line 42
def add(string)
@cmds << string
end
|
#error! ⇒ Object
57
58
59
|
# File 'lib/taste_tester/noop.rb', line 57
def error!
end
|
#print_noop_warning ⇒ Object
32
33
34
35
36
37
38
39
40
|
# File 'lib/taste_tester/noop.rb', line 32
def print_noop_warning
@@printedwarning ||= logger.warn(
'No-op plugin active, no remote commands will be run!',
)
end
|
#run ⇒ Object
48
49
50
|
# File 'lib/taste_tester/noop.rb', line 48
def run
run!
end
|
#run! ⇒ Object
52
53
54
55
|
# File 'lib/taste_tester/noop.rb', line 52
def run!
cmd
[0, "# TasteTester by #{@user}"]
end
|