Class: PDFire::ConversionParams
- Inherits:
-
Object
- Object
- PDFire::ConversionParams
- Defined in:
- lib/conversion_params.rb
Instance Attribute Summary collapse
- #allow_error_page ⇒ Boolean
- #block_ads ⇒ Boolean
- #cdn ⇒ Boolean
- #delay ⇒ Integer
- #emulate_media ⇒ String
- #footer_template ⇒ String
- #format ⇒ Float
- #header_template ⇒ String
- #headers ⇒ Hash
- #html ⇒ String
- #landscape ⇒ Boolean
- #margin ⇒ Integer, String
- #margin_bottom ⇒ Integer, String
- #margin_left ⇒ Integer, String
- #margin_right ⇒ Integer, String
- #margin_top ⇒ Integer, String
- #optimize ⇒ Boolean
- #owner_password ⇒ String
- #page_ranges ⇒ String
- #paper_height ⇒ Integer, String
- #paper_width ⇒ Integer, String
- #prefer_css_page_size ⇒ Boolean
- #print_background ⇒ Boolean
- #scale ⇒ Boolean
- #selector ⇒ String
- #storage ⇒ Boolean, Hash
- #timeout ⇒ Integer
- #url ⇒ String
- #user_password ⇒ String
- #viewport_height ⇒ Integer, String
- #viewport_width ⇒ Integer, String
- #wait_for_selector ⇒ String
- #wait_for_selector_timeout ⇒ Integer
- #wait_until ⇒ String
- #wait_until_timeout ⇒ Integer
Instance Method Summary collapse
Instance Attribute Details
#allow_error_page ⇒ Boolean
70 71 72 |
# File 'lib/conversion_params.rb', line 70 def allow_error_page @allow_error_page end |
#block_ads ⇒ Boolean
46 47 48 |
# File 'lib/conversion_params.rb', line 46 def block_ads @block_ads end |
#cdn ⇒ Boolean
8 9 10 |
# File 'lib/conversion_params.rb', line 8 def cdn @cdn end |
#delay ⇒ Integer
58 59 60 |
# File 'lib/conversion_params.rb', line 58 def delay @delay end |
#emulate_media ⇒ String
64 65 66 |
# File 'lib/conversion_params.rb', line 64 def emulate_media @emulate_media end |
#footer_template ⇒ String
38 39 40 |
# File 'lib/conversion_params.rb', line 38 def end |
#format ⇒ Float
18 19 20 |
# File 'lib/conversion_params.rb', line 18 def format @format end |
#header_template ⇒ String
36 37 38 |
# File 'lib/conversion_params.rb', line 36 def header_template @header_template end |
#headers ⇒ Hash
62 63 64 |
# File 'lib/conversion_params.rb', line 62 def headers @headers end |
#html ⇒ String
4 5 6 |
# File 'lib/conversion_params.rb', line 4 def html @html end |
#landscape ⇒ Boolean
12 13 14 |
# File 'lib/conversion_params.rb', line 12 def landscape @landscape end |
#margin ⇒ Integer, String
24 25 26 |
# File 'lib/conversion_params.rb', line 24 def margin @margin end |
#margin_bottom ⇒ Integer, String
30 31 32 |
# File 'lib/conversion_params.rb', line 30 def margin_bottom @margin_bottom end |
#margin_left ⇒ Integer, String
32 33 34 |
# File 'lib/conversion_params.rb', line 32 def margin_left @margin_left end |
#margin_right ⇒ Integer, String
28 29 30 |
# File 'lib/conversion_params.rb', line 28 def margin_right @margin_right end |
#margin_top ⇒ Integer, String
26 27 28 |
# File 'lib/conversion_params.rb', line 26 def margin_top @margin_top end |
#optimize ⇒ Boolean
72 73 74 |
# File 'lib/conversion_params.rb', line 72 def optimize @optimize end |
#owner_password ⇒ String
66 67 68 |
# File 'lib/conversion_params.rb', line 66 def owner_password @owner_password end |
#page_ranges ⇒ String
34 35 36 |
# File 'lib/conversion_params.rb', line 34 def page_ranges @page_ranges end |
#paper_height ⇒ Integer, String
22 23 24 |
# File 'lib/conversion_params.rb', line 22 def paper_height @paper_height end |
#paper_width ⇒ Integer, String
20 21 22 |
# File 'lib/conversion_params.rb', line 20 def paper_width @paper_width end |
#prefer_css_page_size ⇒ Boolean
40 41 42 |
# File 'lib/conversion_params.rb', line 40 def prefer_css_page_size @prefer_css_page_size end |
#print_background ⇒ Boolean
14 15 16 |
# File 'lib/conversion_params.rb', line 14 def print_background @print_background end |
#scale ⇒ Boolean
16 17 18 |
# File 'lib/conversion_params.rb', line 16 def scale @scale end |
#selector ⇒ String
48 49 50 |
# File 'lib/conversion_params.rb', line 48 def selector @selector end |
#storage ⇒ Boolean, Hash
10 11 12 |
# File 'lib/conversion_params.rb', line 10 def storage @storage end |
#timeout ⇒ Integer
60 61 62 |
# File 'lib/conversion_params.rb', line 60 def timeout @timeout end |
#url ⇒ String
6 7 8 |
# File 'lib/conversion_params.rb', line 6 def url @url end |
#user_password ⇒ String
68 69 70 |
# File 'lib/conversion_params.rb', line 68 def user_password @user_password end |
#viewport_height ⇒ Integer, String
44 45 46 |
# File 'lib/conversion_params.rb', line 44 def end |
#viewport_width ⇒ Integer, String
42 43 44 |
# File 'lib/conversion_params.rb', line 42 def end |
#wait_for_selector ⇒ String
50 51 52 |
# File 'lib/conversion_params.rb', line 50 def wait_for_selector @wait_for_selector end |
#wait_for_selector_timeout ⇒ Integer
52 53 54 |
# File 'lib/conversion_params.rb', line 52 def wait_for_selector_timeout @wait_for_selector_timeout end |
#wait_until ⇒ String
54 55 56 |
# File 'lib/conversion_params.rb', line 54 def wait_until @wait_until end |
#wait_until_timeout ⇒ Integer
56 57 58 |
# File 'lib/conversion_params.rb', line 56 def wait_until_timeout @wait_until_timeout end |
Instance Method Details
#to_map ⇒ Object
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/conversion_params.rb', line 74 def to_map map = {} map['html'] = @html if @html != nil map['url'] = @url if @url != nil map['cdn'] = @cdn if @cdn != nil map['storage'] = @storage if @storage != nil map['landscape'] = @landscape if @landscape != nil map['printBackground'] = @print_background if @print_background != nil map['scale'] = @scale if @scale != nil map['format'] = @format if @format != nil map['paperWidth'] = @paper_width if @paper_width != nil map['paperHeight'] = @paper_height if @paper_height != nil map['margin'] = @margin if @margin != nil map['marginTop'] = @margin_top if @margin_top != nil map['marginRight'] = @margin_right if @margin_right != nil map['marginBottom'] = @margin_bottom if @margin_bottom != nil map['marginLeft'] = @margin_left if @margin_left != nil map['pageRanges'] = @page_ranges if @page_ranges != nil map['headerTemplate'] = @header_template if @header_template != nil map['footerTemplate'] = if != nil map['preferCSSPageSize'] = @prefer_css_page_size if @prefer_css_page_size != nil map['viewportWidth'] = if != nil map['viewportHeight'] = if != nil map['blockAds'] = @block_ads if @block_ads != nil map['selector'] = @selector if @selector != nil map['waitForSelector'] = @wait_for_selector if @wait_for_selector != nil map['waitForSelectorTimeout'] = @wait_for_selector_timeout if @wait_for_selector_timeout != nil map['waitUntil'] = @wait_until if @wait_until != nil map['waitUntilTimeout'] = @wait_until_timeout if @wait_until_timeout != nil map['delay'] = @delay if @delay != nil map['timeout'] = @timeout if @timeout != nil map['headers'] = @headers if @headers != nil map['emulateMedia'] = @emulate_media if @emulate_media != nil map['ownerPassword'] = @owner_password if @owner_password != nil map['userPassword'] = @user_password if @user_password != nil map['allowErrorPage'] = @allow_error_page if @allow_error_page != nil map['optimize'] = @optimize if @optimize != nil return map end |