Class: Grover::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/grover/configuration.rb

Overview

Configuration of the options for Grover HTML to PDF conversion

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

rubocop:disable Metrics/MethodLength



13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/grover/configuration.rb', line 13

def initialize # rubocop:disable Metrics/MethodLength
  @options = {}
  @meta_tag_prefix = 'grover-'
  @ignore_path = nil
  @ignore_request = nil
  @root_url = nil
  @use_pdf_middleware = true
  @use_png_middleware = false
  @use_jpeg_middleware = false
  @js_runtime_bin = ['node']
  @node_env_vars = {}
  @allow_file_uris = false
end

Instance Attribute Details

#allow_file_urisObject

Returns the value of attribute allow_file_uris.



8
9
10
# File 'lib/grover/configuration.rb', line 8

def allow_file_uris
  @allow_file_uris
end

#ignore_pathObject

Returns the value of attribute ignore_path.



8
9
10
# File 'lib/grover/configuration.rb', line 8

def ignore_path
  @ignore_path
end

#ignore_requestObject

Returns the value of attribute ignore_request.



8
9
10
# File 'lib/grover/configuration.rb', line 8

def ignore_request
  @ignore_request
end

#js_runtime_binObject

Returns the value of attribute js_runtime_bin.



8
9
10
# File 'lib/grover/configuration.rb', line 8

def js_runtime_bin
  @js_runtime_bin
end

#meta_tag_prefixObject

Returns the value of attribute meta_tag_prefix.



8
9
10
# File 'lib/grover/configuration.rb', line 8

def meta_tag_prefix
  @meta_tag_prefix
end

#node_env_varsObject

Returns the value of attribute node_env_vars.



8
9
10
# File 'lib/grover/configuration.rb', line 8

def node_env_vars
  @node_env_vars
end

#optionsObject

Returns the value of attribute options.



8
9
10
# File 'lib/grover/configuration.rb', line 8

def options
  @options
end

#root_urlObject

Returns the value of attribute root_url.



8
9
10
# File 'lib/grover/configuration.rb', line 8

def root_url
  @root_url
end

#use_jpeg_middlewareObject

Returns the value of attribute use_jpeg_middleware.



8
9
10
# File 'lib/grover/configuration.rb', line 8

def use_jpeg_middleware
  @use_jpeg_middleware
end

#use_pdf_middlewareObject

Returns the value of attribute use_pdf_middleware.



8
9
10
# File 'lib/grover/configuration.rb', line 8

def use_pdf_middleware
  @use_pdf_middleware
end

#use_png_middlewareObject

Returns the value of attribute use_png_middleware.



8
9
10
# File 'lib/grover/configuration.rb', line 8

def use_png_middleware
  @use_png_middleware
end