Class: Pdf2Html::OptionProvider
- Inherits:
-
Object
- Object
- Pdf2Html::OptionProvider
- Defined in:
- lib/pdf2html/option_provider.rb
Instance Attribute Summary collapse
-
#keys ⇒ Object
readonly
Returns the value of attribute keys.
Instance Method Summary collapse
-
#initialize(args, options = {}) ⇒ OptionProvider
constructor
A new instance of OptionProvider.
- #to_h ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(args, options = {}) ⇒ OptionProvider
Returns a new instance of OptionProvider.
51 52 53 54 55 |
# File 'lib/pdf2html/option_provider.rb', line 51 def initialize(args, = {}) @keys = PDF2HTMLEX_OPTIONS.keys & .keys = () @args = args end |
Instance Attribute Details
#keys ⇒ Object (readonly)
Returns the value of attribute keys.
49 50 51 |
# File 'lib/pdf2html/option_provider.rb', line 49 def keys @keys end |
Instance Method Details
#to_h ⇒ Object
64 65 66 |
# File 'lib/pdf2html/option_provider.rb', line 64 def to_h .merge(@args) end |
#to_s ⇒ Object
57 58 59 60 61 62 |
# File 'lib/pdf2html/option_provider.rb', line 57 def to_s return "" if @keys.empty? ((, PDF2HTMLEX_OPTIONS) + PDF2HTMLEX_ARGS).join(" ") end |