Class: DuoSplitter::Services::Support::BaseConcatenate
- Inherits:
-
Object
- Object
- DuoSplitter::Services::Support::BaseConcatenate
- Defined in:
- lib/duo_splitter/services/support/base_concatenate.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#commands ⇒ Object
readonly
Returns the value of attribute commands.
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Instance Method Summary collapse
-
#initialize(context:) ⇒ BaseConcatenate
constructor
A new instance of BaseConcatenate.
- #run ⇒ Object
Constructor Details
#initialize(context:) ⇒ BaseConcatenate
Returns a new instance of BaseConcatenate.
9 10 11 12 13 14 15 |
# File 'lib/duo_splitter/services/support/base_concatenate.rb', line 9 def initialize(context:) @context = context raise Error, "temp_dir isn't set" unless @context.temp_dir @commands = build_commands end |
Instance Attribute Details
#commands ⇒ Object (readonly)
Returns the value of attribute commands.
7 8 9 |
# File 'lib/duo_splitter/services/support/base_concatenate.rb', line 7 def commands @commands end |
#context ⇒ Object (readonly)
Returns the value of attribute context.
7 8 9 |
# File 'lib/duo_splitter/services/support/base_concatenate.rb', line 7 def context @context end |
Instance Method Details
#run ⇒ Object
17 18 19 20 21 |
# File 'lib/duo_splitter/services/support/base_concatenate.rb', line 17 def run return if @commands.empty? BatchProcessor.new(message: 'concatenating...', show_progress: @context.show_progress).run(@commands) end |