Class: WeasyRb::CommandBuilder
- Inherits:
-
Object
- Object
- WeasyRb::CommandBuilder
- Defined in:
- lib/weasy_rb/command_builder.rb
Overview
Responsible for building WeasyPrint command strings Follows Single Responsibility Principle and Open/Closed Principle
Constant Summary collapse
- WEASY_PRINT_COMMAND =
"weasyprint"
Instance Method Summary collapse
-
#build(output_path, options = {}) ⇒ Array<String>
Build WeasyPrint command with options.
Instance Method Details
#build(output_path, options = {}) ⇒ Array<String>
Build WeasyPrint command with options
13 14 15 16 17 18 19 |
# File 'lib/weasy_rb/command_builder.rb', line 13 def build(output_path, = {}) command = [WEASY_PRINT_COMMAND] command.concat(()) command << "-" # Read from stdin command << output_path command end |