Class: MKBrut::Ops::BaseOp
- Inherits:
-
Object
- Object
- MKBrut::Ops::BaseOp
show all
- Defined in:
- lib/mkbrut/ops/base_op.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.dry_run=(value) ⇒ Object
4
5
6
|
# File 'lib/mkbrut/ops/base_op.rb', line 4
def self.dry_run=(value)
MKBrut::Ops::BaseOp.instance_variable_set(:@dry_run, value)
end
|
.dry_run? ⇒ Boolean
8
|
# File 'lib/mkbrut/ops/base_op.rb', line 8
def self.dry_run? = !!MKBrut::Ops::BaseOp.instance_variable_get(:@dry_run)
|
.fileutils_args ⇒ Object
13
14
15
16
17
18
19
|
# File 'lib/mkbrut/ops/base_op.rb', line 13
def self.fileutils_args
if self.dry_run?
{ noop: true, verbose: true }
else
{}
end
end
|
Instance Method Details
#call ⇒ Object
11
|
# File 'lib/mkbrut/ops/base_op.rb', line 11
def call = raise "Subclass must implement"
|
#dry_run? ⇒ Boolean
9
|
# File 'lib/mkbrut/ops/base_op.rb', line 9
def dry_run? = self.class.dry_run?
|
#fileutils_args ⇒ Object
20
|
# File 'lib/mkbrut/ops/base_op.rb', line 20
def fileutils_args = self.class.fileutils_args
|