Class: Gotenberg::Libreoffice
- Inherits:
-
Object
- Object
- Gotenberg::Libreoffice
- Includes:
- Files, Headers, Properties, Tools, Metadata
- Defined in:
- lib/gotenberg/libreoffice.rb,
lib/gotenberg/libreoffice/tools.rb,
lib/gotenberg/libreoffice/properties.rb
Defined Under Namespace
Modules: Properties, Tools
Instance Attribute Summary collapse
-
#base_path ⇒ Object
Returns the value of attribute base_path.
-
#client_headers ⇒ Object
Returns the value of attribute client_headers.
-
#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| ... } ⇒ Libreoffice
constructor
A new instance of Libreoffice.
- #success? ⇒ Boolean
- #to_binary ⇒ Object
Methods included from Properties
#landscape, #merge, #native_page_ranges, #native_pdf_format, #pdf_format
Methods included from Headers
#client_extra_http_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| ... } ⇒ Libreoffice
Returns a new instance of Libreoffice.
20 21 22 23 24 25 26 |
# File 'lib/gotenberg/libreoffice.rb', line 20 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.
13 14 15 |
# File 'lib/gotenberg/libreoffice.rb', line 13 def base_path @base_path end |
#client_headers ⇒ Object
Returns the value of attribute client_headers.
13 14 15 |
# File 'lib/gotenberg/libreoffice.rb', line 13 def client_headers @client_headers end |
#endpoint ⇒ Object (readonly)
Returns the value of attribute endpoint.
14 15 16 |
# File 'lib/gotenberg/libreoffice.rb', line 14 def endpoint @endpoint end |
#exception ⇒ Object (readonly)
Returns the value of attribute exception.
14 15 16 |
# File 'lib/gotenberg/libreoffice.rb', line 14 def exception @exception end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
14 15 16 |
# File 'lib/gotenberg/libreoffice.rb', line 14 def response @response end |
Class Method Details
.call(base_path, headers: {}, &block) ⇒ Object
16 17 18 |
# File 'lib/gotenberg/libreoffice.rb', line 16 def self.call(base_path, headers: {}, &block) new(base_path: base_path, client_headers: headers, &block).call end |
Instance Method Details
#call ⇒ Object
28 29 30 31 32 |
# File 'lib/gotenberg/libreoffice.rb', line 28 def call transform self end |
#success? ⇒ Boolean
34 35 36 |
# File 'lib/gotenberg/libreoffice.rb', line 34 def success? exception == nil end |
#to_binary ⇒ Object
38 39 40 |
# File 'lib/gotenberg/libreoffice.rb', line 38 def to_binary response || raise(exception) end |