Class: Gotenberg::Chromium
- Inherits:
-
Object
- Object
- Gotenberg::Chromium
- Includes:
- Files, Headers, Metadata, Properties, Extractors
- Defined in:
- lib/gotenberg/chromium.rb,
lib/gotenberg/chromium/files.rb,
lib/gotenberg/chromium/headers.rb,
lib/gotenberg/chromium/metadata.rb,
lib/gotenberg/chromium/properties.rb
Defined Under Namespace
Modules: Files, Headers, Metadata, Properties
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| ... } ⇒ Chromium
constructor
A new instance of Chromium.
- #success? ⇒ Boolean
- #to_binary ⇒ Object
Methods included from Properties
#emulate_media_type, #extra_http_headers, #fail_on_console_exceptions, #landscape, #margins, #native_page_ranges, #paper_size, #pdf_format, #prefer_css_page_size, #print_background, #properties, #scale, #url, #user_agent, #wait_delay, #wait_for_expression
Methods included from Files
#assets, #binary_assets, #files, #footer, #header, #html, #markdown
Methods included from Headers
#headers, #trace, #webhook, #webhook_error_method, #webhook_extra_http_headers, #webhook_method
Methods included from Metadata
Constructor Details
#initialize(args) {|_self| ... } ⇒ Chromium
Returns a new instance of Chromium.
20 21 22 23 24 25 26 |
# File 'lib/gotenberg/chromium.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/chromium.rb', line 13 def base_path @base_path end |
#endpoint ⇒ Object (readonly)
Returns the value of attribute endpoint.
14 15 16 |
# File 'lib/gotenberg/chromium.rb', line 14 def endpoint @endpoint end |
#exception ⇒ Object (readonly)
Returns the value of attribute exception.
14 15 16 |
# File 'lib/gotenberg/chromium.rb', line 14 def exception @exception end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
14 15 16 |
# File 'lib/gotenberg/chromium.rb', line 14 def response @response end |
Class Method Details
.call(base_path, &block) ⇒ Object
16 17 18 |
# File 'lib/gotenberg/chromium.rb', line 16 def self.call(base_path, &block) new(base_path: base_path, &block).call end |
Instance Method Details
#call ⇒ Object
28 29 30 31 32 33 34 35 36 |
# File 'lib/gotenberg/chromium.rb', line 28 def call transform if success? && end self end |
#success? ⇒ Boolean
38 39 40 |
# File 'lib/gotenberg/chromium.rb', line 38 def success? @exception == nil end |
#to_binary ⇒ Object
42 43 44 |
# File 'lib/gotenberg/chromium.rb', line 42 def to_binary response end |