Class: ScreenshotScout::CaptureOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/screenshotscout/capture_options.rb,
sig/screenshotscout.rbs

Overview

Keyword-initialized options for one Screenshot Scout capture.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**options) ⇒ CaptureOptions

Returns a new instance of CaptureOptions.



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/screenshotscout/capture_options.rb', line 23

def initialize(**options)
  unknown = options.keys - ATTRIBUTE_NAMES
  unless unknown.empty?
    option = unknown.first
    raise SerializationError.new("Unknown capture option \"#{option}\".", option: option)
  end

  ATTRIBUTE_NAMES.each do |name|
    instance_variable_set("@#{name}", options[name])
  end
end

Instance Attribute Details

#block_adsBoolean? (readonly)

Returns the value of attribute block_ads.

Returns:

  • (Boolean, nil)


109
110
111
# File 'sig/screenshotscout.rbs', line 109

def block_ads
  @block_ads
end

#block_chat_widgetsBoolean? (readonly)

Returns the value of attribute block_chat_widgets.

Returns:

  • (Boolean, nil)


110
111
112
# File 'sig/screenshotscout.rbs', line 110

def block_chat_widgets
  @block_chat_widgets
end

Returns the value of attribute block_cookie_banners.

Returns:

  • (Boolean, nil)


108
109
110
# File 'sig/screenshotscout.rbs', line 108

def block_cookie_banners
  @block_cookie_banners
end

#bypass_cspBoolean? (readonly)

Returns the value of attribute bypass_csp.

Returns:

  • (Boolean, nil)


116
117
118
# File 'sig/screenshotscout.rbs', line 116

def bypass_csp
  @bypass_csp
end

#cacheBoolean? (readonly)

Returns the value of attribute cache.

Returns:

  • (Boolean, nil)


138
139
140
# File 'sig/screenshotscout.rbs', line 138

def cache
  @cache
end

#cache_keyString? (readonly)

Returns the value of attribute cache_key.

Returns:

  • (String, nil)


140
141
142
# File 'sig/screenshotscout.rbs', line 140

def cache_key
  @cache_key
end

#cache_ttlInteger? (readonly)

Returns the value of attribute cache_ttl.

Returns:

  • (Integer, nil)


139
140
141
# File 'sig/screenshotscout.rbs', line 139

def cache_ttl
  @cache_ttl
end

#click_all_selectorsArray[String]? (readonly)

Returns the value of attribute click_all_selectors.

Returns:

  • (Array[String], nil)


113
114
115
# File 'sig/screenshotscout.rbs', line 113

def click_all_selectors
  @click_all_selectors
end

#click_selectorsArray[String]? (readonly)

Returns the value of attribute click_selectors.

Returns:

  • (Array[String], nil)


112
113
114
# File 'sig/screenshotscout.rbs', line 112

def click_selectors
  @click_selectors
end

#clip_heightInteger? (readonly)

Returns the value of attribute clip_height.

Returns:

  • (Integer, nil)


121
122
123
# File 'sig/screenshotscout.rbs', line 121

def clip_height
  @clip_height
end

#clip_widthInteger? (readonly)

Returns the value of attribute clip_width.

Returns:

  • (Integer, nil)


120
121
122
# File 'sig/screenshotscout.rbs', line 120

def clip_width
  @clip_width
end

#clip_xInteger? (readonly)

Returns the value of attribute clip_x.

Returns:

  • (Integer, nil)


118
119
120
# File 'sig/screenshotscout.rbs', line 118

def clip_x
  @clip_x
end

#clip_yInteger? (readonly)

Returns the value of attribute clip_y.

Returns:

  • (Integer, nil)


119
120
121
# File 'sig/screenshotscout.rbs', line 119

def clip_y
  @clip_y
end

#color_schemeString? (readonly)

Returns the value of attribute color_scheme.

Returns:

  • (String, nil)


101
102
103
# File 'sig/screenshotscout.rbs', line 101

def color_scheme
  @color_scheme
end

#cookiesArray[String]? (readonly)

Returns the value of attribute cookies.

Returns:

  • (Array[String], nil)


86
87
88
# File 'sig/screenshotscout.rbs', line 86

def cookies
  @cookies
end

#countryString? (readonly)

Returns the value of attribute country.

Returns:

  • (String, nil)


81
82
83
# File 'sig/screenshotscout.rbs', line 81

def country
  @country
end

#delayInteger? (readonly)

Returns the value of attribute delay.

Returns:

  • (Integer, nil)


91
92
93
# File 'sig/screenshotscout.rbs', line 91

def delay
  @delay
end

#deviceString? (readonly)

Returns the value of attribute device.

Returns:

  • (String, nil)


92
93
94
# File 'sig/screenshotscout.rbs', line 92

def device
  @device
end

#device_has_touchBoolean? (readonly)

Returns the value of attribute device_has_touch.

Returns:

  • (Boolean, nil)


97
98
99
# File 'sig/screenshotscout.rbs', line 97

def device_has_touch
  @device_has_touch
end

#device_is_mobileBoolean? (readonly)

Returns the value of attribute device_is_mobile.

Returns:

  • (Boolean, nil)


96
97
98
# File 'sig/screenshotscout.rbs', line 96

def device_is_mobile
  @device_is_mobile
end

#device_scale_factornumber? (readonly)

Returns the value of attribute device_scale_factor.

Returns:

  • (number, nil)


95
96
97
# File 'sig/screenshotscout.rbs', line 95

def device_scale_factor
  @device_scale_factor
end

#device_user_agentString? (readonly)

Returns the value of attribute device_user_agent.

Returns:

  • (String, nil)


98
99
100
# File 'sig/screenshotscout.rbs', line 98

def device_user_agent
  @device_user_agent
end

#device_viewport_heightInteger? (readonly)

Returns the value of attribute device_viewport_height.

Returns:

  • (Integer, nil)


94
95
96
# File 'sig/screenshotscout.rbs', line 94

def device_viewport_height
  @device_viewport_height
end

#device_viewport_widthInteger? (readonly)

Returns the value of attribute device_viewport_width.

Returns:

  • (Integer, nil)


93
94
95
# File 'sig/screenshotscout.rbs', line 93

def device_viewport_width
  @device_viewport_width
end

#formatString? (readonly)

Returns the value of attribute format.

Returns:

  • (String, nil)


79
80
81
# File 'sig/screenshotscout.rbs', line 79

def format
  @format
end

#full_pageBoolean? (readonly)

Returns the value of attribute full_page.

Returns:

  • (Boolean, nil)


103
104
105
# File 'sig/screenshotscout.rbs', line 103

def full_page
  @full_page
end

#full_page_max_heightInteger? (readonly)

Returns the value of attribute full_page_max_height.

Returns:

  • (Integer, nil)


107
108
109
# File 'sig/screenshotscout.rbs', line 107

def full_page_max_height
  @full_page_max_height
end

#full_page_pre_scrollBoolean? (readonly)

Returns the value of attribute full_page_pre_scroll.

Returns:

  • (Boolean, nil)


104
105
106
# File 'sig/screenshotscout.rbs', line 104

def full_page_pre_scroll
  @full_page_pre_scroll
end

#full_page_pre_scroll_stepInteger? (readonly)

Returns the value of attribute full_page_pre_scroll_step.

Returns:

  • (Integer, nil)


105
106
107
# File 'sig/screenshotscout.rbs', line 105

def full_page_pre_scroll_step
  @full_page_pre_scroll_step
end

#full_page_pre_scroll_step_delayInteger? (readonly)

Returns the value of attribute full_page_pre_scroll_step_delay.

Returns:

  • (Integer, nil)


106
107
108
# File 'sig/screenshotscout.rbs', line 106

def full_page_pre_scroll_step_delay
  @full_page_pre_scroll_step_delay
end

#geolocation_accuracynumber? (readonly)

Returns the value of attribute geolocation_accuracy.

Returns:

  • (number, nil)


85
86
87
# File 'sig/screenshotscout.rbs', line 85

def geolocation_accuracy
  @geolocation_accuracy
end

#geolocation_latitudenumber? (readonly)

Returns the value of attribute geolocation_latitude.

Returns:

  • (number, nil)


83
84
85
# File 'sig/screenshotscout.rbs', line 83

def geolocation_latitude
  @geolocation_latitude
end

#geolocation_longitudenumber? (readonly)

Returns the value of attribute geolocation_longitude.

Returns:

  • (number, nil)


84
85
86
# File 'sig/screenshotscout.rbs', line 84

def geolocation_longitude
  @geolocation_longitude
end

#headersArray[String]? (readonly)

Returns the value of attribute headers.

Returns:

  • (Array[String], nil)


87
88
89
# File 'sig/screenshotscout.rbs', line 87

def headers
  @headers
end

#hide_selectorsArray[String]? (readonly)

Returns the value of attribute hide_selectors.

Returns:

  • (Array[String], nil)


111
112
113
# File 'sig/screenshotscout.rbs', line 111

def hide_selectors
  @hide_selectors
end

#image_allow_upscaleBoolean? (readonly)

Returns the value of attribute image_allow_upscale.

Returns:

  • (Boolean, nil)


126
127
128
# File 'sig/screenshotscout.rbs', line 126

def image_allow_upscale
  @image_allow_upscale
end

#image_anchorString? (readonly)

Returns the value of attribute image_anchor.

Returns:

  • (String, nil)


125
126
127
# File 'sig/screenshotscout.rbs', line 125

def image_anchor
  @image_anchor
end

#image_backgroundString? (readonly)

Returns the value of attribute image_background.

Returns:

  • (String, nil)


127
128
129
# File 'sig/screenshotscout.rbs', line 127

def image_background
  @image_background
end

#image_heightInteger? (readonly)

Returns the value of attribute image_height.

Returns:

  • (Integer, nil)


123
124
125
# File 'sig/screenshotscout.rbs', line 123

def image_height
  @image_height
end

#image_modeString? (readonly)

Returns the value of attribute image_mode.

Returns:

  • (String, nil)


124
125
126
# File 'sig/screenshotscout.rbs', line 124

def image_mode
  @image_mode
end

#image_qualityInteger? (readonly)

Returns the value of attribute image_quality.

Returns:

  • (Integer, nil)


128
129
130
# File 'sig/screenshotscout.rbs', line 128

def image_quality
  @image_quality
end

#image_widthInteger? (readonly)

Returns the value of attribute image_width.

Returns:

  • (Integer, nil)


122
123
124
# File 'sig/screenshotscout.rbs', line 122

def image_width
  @image_width
end

#inject_cssArray[String]? (readonly)

Returns the value of attribute inject_css.

Returns:

  • (Array[String], nil)


114
115
116
# File 'sig/screenshotscout.rbs', line 114

def inject_css
  @inject_css
end

#inject_jsArray[String]? (readonly)

Returns the value of attribute inject_js.

Returns:

  • (Array[String], nil)


115
116
117
# File 'sig/screenshotscout.rbs', line 115

def inject_js
  @inject_js
end

#media_typeString? (readonly)

Returns the value of attribute media_type.

Returns:

  • (String, nil)


100
101
102
# File 'sig/screenshotscout.rbs', line 100

def media_type
  @media_type
end

Returns the value of attribute navigation_timeout.

Returns:

  • (Integer, nil)


90
91
92
# File 'sig/screenshotscout.rbs', line 90

def navigation_timeout
  @navigation_timeout
end

#pdf_landscapeBoolean? (readonly)

Returns the value of attribute pdf_landscape.

Returns:

  • (Boolean, nil)


130
131
132
# File 'sig/screenshotscout.rbs', line 130

def pdf_landscape
  @pdf_landscape
end

#pdf_marginString? (readonly)

Returns the value of attribute pdf_margin.

Returns:

  • (String, nil)


132
133
134
# File 'sig/screenshotscout.rbs', line 132

def pdf_margin
  @pdf_margin
end

#pdf_margin_bottomString? (readonly)

Returns the value of attribute pdf_margin_bottom.

Returns:

  • (String, nil)


135
136
137
# File 'sig/screenshotscout.rbs', line 135

def pdf_margin_bottom
  @pdf_margin_bottom
end

#pdf_margin_leftString? (readonly)

Returns the value of attribute pdf_margin_left.

Returns:

  • (String, nil)


136
137
138
# File 'sig/screenshotscout.rbs', line 136

def pdf_margin_left
  @pdf_margin_left
end

#pdf_margin_rightString? (readonly)

Returns the value of attribute pdf_margin_right.

Returns:

  • (String, nil)


134
135
136
# File 'sig/screenshotscout.rbs', line 134

def pdf_margin_right
  @pdf_margin_right
end

#pdf_margin_topString? (readonly)

Returns the value of attribute pdf_margin_top.

Returns:

  • (String, nil)


133
134
135
# File 'sig/screenshotscout.rbs', line 133

def pdf_margin_top
  @pdf_margin_top
end

#pdf_paper_formatString? (readonly)

Returns the value of attribute pdf_paper_format.

Returns:

  • (String, nil)


129
130
131
# File 'sig/screenshotscout.rbs', line 129

def pdf_paper_format
  @pdf_paper_format
end

#pdf_print_backgroundBoolean? (readonly)

Returns the value of attribute pdf_print_background.

Returns:

  • (Boolean, nil)


131
132
133
# File 'sig/screenshotscout.rbs', line 131

def pdf_print_background
  @pdf_print_background
end

#pdf_scalenumber? (readonly)

Returns the value of attribute pdf_scale.

Returns:

  • (number, nil)


137
138
139
# File 'sig/screenshotscout.rbs', line 137

def pdf_scale
  @pdf_scale
end

#proxyString? (readonly)

Returns the value of attribute proxy.

Returns:

  • (String, nil)


82
83
84
# File 'sig/screenshotscout.rbs', line 82

def proxy
  @proxy
end

#reduced_motionBoolean? (readonly)

Returns the value of attribute reduced_motion.

Returns:

  • (Boolean, nil)


102
103
104
# File 'sig/screenshotscout.rbs', line 102

def reduced_motion
  @reduced_motion
end

#response_typeString? (readonly)

Returns the value of attribute response_type.

Returns:

  • (String, nil)


80
81
82
# File 'sig/screenshotscout.rbs', line 80

def response_type
  @response_type
end

#selectorString? (readonly)

Returns the value of attribute selector.

Returns:

  • (String, nil)


117
118
119
# File 'sig/screenshotscout.rbs', line 117

def selector
  @selector
end

#storage_bucketString? (readonly)

Returns the value of attribute storage_bucket.

Returns:

  • (String, nil)


143
144
145
# File 'sig/screenshotscout.rbs', line 143

def storage_bucket
  @storage_bucket
end

#storage_endpointString? (readonly)

Returns the value of attribute storage_endpoint.

Returns:

  • (String, nil)


142
143
144
# File 'sig/screenshotscout.rbs', line 142

def storage_endpoint
  @storage_endpoint
end

#storage_modeString? (readonly)

Returns the value of attribute storage_mode.

Returns:

  • (String, nil)


141
142
143
# File 'sig/screenshotscout.rbs', line 141

def storage_mode
  @storage_mode
end

#storage_object_keyString? (readonly)

Returns the value of attribute storage_object_key.

Returns:

  • (String, nil)


145
146
147
# File 'sig/screenshotscout.rbs', line 145

def storage_object_key
  @storage_object_key
end

#storage_regionString? (readonly)

Returns the value of attribute storage_region.

Returns:

  • (String, nil)


144
145
146
# File 'sig/screenshotscout.rbs', line 144

def storage_region
  @storage_region
end

#timeoutInteger? (readonly)

Returns the value of attribute timeout.

Returns:

  • (Integer, nil)


88
89
90
# File 'sig/screenshotscout.rbs', line 88

def timeout
  @timeout
end

#timezoneString? (readonly)

Returns the value of attribute timezone.

Returns:

  • (String, nil)


99
100
101
# File 'sig/screenshotscout.rbs', line 99

def timezone
  @timezone
end

#wait_untilString? (readonly)

Returns the value of attribute wait_until.

Returns:

  • (String, nil)


89
90
91
# File 'sig/screenshotscout.rbs', line 89

def wait_until
  @wait_until
end