Class: Applitools::Calabash::CalabashScreenshotProvider

Inherits:
Object
  • Object
show all
Defined in:
lib/applitools/calabash/calabash_screenshot_provider.rb

Constant Summary collapse

WAIT_BEFORE_SCREENSHOT =
1

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(_options = {}) ⇒ CalabashScreenshotProvider



7
8
9
# File 'lib/applitools/calabash/calabash_screenshot_provider.rb', line 7

def initialize(_options = {})
  @density = 1
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



5
6
7
# File 'lib/applitools/calabash/calabash_screenshot_provider.rb', line 5

def context
  @context
end

#debug_screenshot_providerObject (readonly)

Returns the value of attribute debug_screenshot_provider.



5
6
7
# File 'lib/applitools/calabash/calabash_screenshot_provider.rb', line 5

def debug_screenshot_provider
  @debug_screenshot_provider
end

#densityObject (readonly)

Returns the value of attribute density.



5
6
7
# File 'lib/applitools/calabash/calabash_screenshot_provider.rb', line 5

def density
  @density
end

Instance Method Details

#using_context(value) ⇒ Object



16
17
18
19
# File 'lib/applitools/calabash/calabash_screenshot_provider.rb', line 16

def using_context(value)
  @context = value
  self
end

#with_debug_screenshot_provider(value) ⇒ Object



21
22
23
24
25
26
27
28
29
# File 'lib/applitools/calabash/calabash_screenshot_provider.rb', line 21

def with_debug_screenshot_provider(value)
  Applitools::ArgumentGuard.is_a?(
    value,
    'debug_screenshot_provider',
    Applitools::DebugScreenshotProvider
  )
  @debug_screenshot_provider = value
  self
end

#with_density(value) ⇒ Object



11
12
13
14
# File 'lib/applitools/calabash/calabash_screenshot_provider.rb', line 11

def with_density(value)
  @density = value
  self
end