Class: Gotenberg::PdfEngines
- Inherits:
-
Object
- Object
- Gotenberg::PdfEngines
- Includes:
- Files, Headers, Metadata, Properties, Tools
- Defined in:
- lib/gotenberg/pdf_engines.rb,
lib/gotenberg/pdf_engines/tools.rb,
lib/gotenberg/pdf_engines/properties.rb
Defined Under Namespace
Modules: Properties, Tools
Instance Attribute Summary collapse
-
#base_path ⇒ Object
Returns the value of attribute base_path.
-
#endpoint ⇒ Object
readonly
Returns the value of attribute endpoint.
-
#exception ⇒ Object
readonly
Returns the value of attribute exception.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(args) {|_self| ... } ⇒ PdfEngines
constructor
A new instance of PdfEngines.
- #success? ⇒ Boolean
- #to_binary ⇒ Object
Methods included from Properties
Methods included from Headers
#trace, #webhook, #webhook_error_method, #webhook_extra_http_headers, #webhook_method
Methods included from Metadata
Methods included from Tools
Constructor Details
#initialize(args) {|_self| ... } ⇒ PdfEngines
Returns a new instance of PdfEngines.
21 22 23 24 25 26 27 |
# File 'lib/gotenberg/pdf_engines.rb', line 21 def initialize args args.each do |key, value| public_send(('%s=' % key), value) end yield self if block_given? end |
Instance Attribute Details
#base_path ⇒ Object
Returns the value of attribute base_path.
14 15 16 |
# File 'lib/gotenberg/pdf_engines.rb', line 14 def base_path @base_path end |
#endpoint ⇒ Object (readonly)
Returns the value of attribute endpoint.
15 16 17 |
# File 'lib/gotenberg/pdf_engines.rb', line 15 def endpoint @endpoint end |
#exception ⇒ Object (readonly)
Returns the value of attribute exception.
15 16 17 |
# File 'lib/gotenberg/pdf_engines.rb', line 15 def exception @exception end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
15 16 17 |
# File 'lib/gotenberg/pdf_engines.rb', line 15 def response @response end |
Class Method Details
.call(base_path, &block) ⇒ Object
17 18 19 |
# File 'lib/gotenberg/pdf_engines.rb', line 17 def self.call(base_path, &block) new(base_path: base_path, &block).call end |
Instance Method Details
#call ⇒ Object
29 30 31 32 33 34 |
# File 'lib/gotenberg/pdf_engines.rb', line 29 def call transform if self end |
#success? ⇒ Boolean
36 37 38 |
# File 'lib/gotenberg/pdf_engines.rb', line 36 def success? exception == nil end |
#to_binary ⇒ Object
40 41 42 |
# File 'lib/gotenberg/pdf_engines.rb', line 40 def to_binary response || raise(exception) end |