Class: ConfigmonkeyCli::Application::ManifestAction::Inplace
- Inherits:
-
Base
- Object
- Base
- ConfigmonkeyCli::Application::ManifestAction::Inplace
show all
- Defined in:
- lib/configmonkey_cli/application/manifest_actions/inplace.rb
Instance Attribute Summary
Attributes inherited from Base
#app, #args, #manifest, #opts, #thor
Instance Method Summary
collapse
Methods inherited from Base
#args_and_opts, #exists?, #expand_dst, #expand_src, #initialize, #rel, #to_s
Instance Method Details
#destructive ⇒ Object
22
23
24
|
# File 'lib/configmonkey_cli/application/manifest_actions/inplace.rb', line 22
def destructive
instance_exec(manifest, self, &@block)
end
|
#init(label = nil, &block) ⇒ Object
5
6
7
8
|
# File 'lib/configmonkey_cli/application/manifest_actions/inplace.rb', line 5
def init label = nil, &block
@label = label
@block = block
end
|
#inspect ⇒ Object
10
11
12
|
# File 'lib/configmonkey_cli/application/manifest_actions/inplace.rb', line 10
def inspect
@label ? super.gsub("Custom @args", "Custom @label=#{@label} @args") : super
end
|
#prepare ⇒ Object
14
15
16
|
# File 'lib/configmonkey_cli/application/manifest_actions/inplace.rb', line 14
def prepare
status :proc, :yellow, (@label || "unlabeled inplace block"), :blue
end
|
#simulate ⇒ Object
18
19
20
|
# File 'lib/configmonkey_cli/application/manifest_actions/inplace.rb', line 18
def simulate
destructive
end
|