Class: Pdf2htmlDocker::OptionBuilder
- Inherits:
-
Object
- Object
- Pdf2htmlDocker::OptionBuilder
- Defined in:
- lib/pdf2html_docker/option_builder.rb
Instance Attribute Summary collapse
-
#keys ⇒ Object
readonly
Returns the value of attribute keys.
Instance Method Summary collapse
-
#initialize(args, options = {}) ⇒ OptionBuilder
constructor
A new instance of OptionBuilder.
- #to_h ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(args, options = {}) ⇒ OptionBuilder
Returns a new instance of OptionBuilder.
65 66 67 68 69 |
# File 'lib/pdf2html_docker/option_builder.rb', line 65 def initialize(args, = {}) @keys = (CONVERTER_OPTIONS.keys & .keys) + CONVERTER_ARGS @options = () @args = args end |
Instance Attribute Details
#keys ⇒ Object (readonly)
Returns the value of attribute keys.
63 64 65 |
# File 'lib/pdf2html_docker/option_builder.rb', line 63 def keys @keys end |
Instance Method Details
#to_h ⇒ Object
78 79 80 |
# File 'lib/pdf2html_docker/option_builder.rb', line 78 def to_h @options.merge(@args) end |
#to_s ⇒ Object
71 72 73 74 75 76 |
# File 'lib/pdf2html_docker/option_builder.rb', line 71 def to_s return '' if @keys.empty? ((@options, CONVERTER_OPTIONS) + CONVERTER_ARGS).join(' ') end |